summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/lib/h5diff_attr.c8
-rw-r--r--tools/lib/h5diff_dset.c16
-rw-r--r--tools/lib/h5tools_dump.c12
-rw-r--r--tools/src/h5dump/h5dump_xml.c4
-rw-r--r--tools/src/h5ls/h5ls.c2
-rw-r--r--tools/src/h5repack/h5repack.c6
-rw-r--r--tools/src/h5repack/h5repack_copy.c6
-rw-r--r--tools/src/h5repack/h5repack_refs.c2
-rw-r--r--tools/test/h5copy/h5copygentest.c4
-rw-r--r--tools/test/h5diff/CMakeTests.cmake2
-rw-r--r--tools/test/h5diff/h5diffgentest.c24
-rw-r--r--tools/test/h5dump/h5dumpgentest.c32
-rw-r--r--tools/test/h5dump/testh5dump.sh.in24
-rw-r--r--tools/test/h5repack/h5repackgentest.c297
-rw-r--r--tools/test/h5repack/h5repacktst.c20
15 files changed, 199 insertions, 260 deletions
diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c
index 4ad4c90..351e6ab 100644
--- a/tools/lib/h5diff_attr.c
+++ b/tools/lib/h5diff_attr.c
@@ -515,12 +515,12 @@ hsize_t diff_attr(hid_t loc1_id,
/* Free buf1 and buf2, check both VLEN-data VLEN-string to reclaim any
* VLEN memory first */
if(TRUE == h5tools_detect_vlen(mtype1_id))
- H5Dvlen_reclaim(mtype1_id, space1_id, H5P_DEFAULT, buf1);
+ H5Treclaim(mtype1_id, space1_id, H5P_DEFAULT, buf1);
HDfree(buf1);
buf1 = NULL;
if(TRUE == h5tools_detect_vlen(mtype2_id))
- H5Dvlen_reclaim(mtype2_id, space2_id, H5P_DEFAULT, buf2);
+ H5Treclaim(mtype2_id, space2_id, H5P_DEFAULT, buf2);
HDfree(buf2);
buf2 = NULL;
@@ -551,12 +551,12 @@ done:
H5E_BEGIN_TRY {
if(buf1) {
if(buf1hasdata && TRUE == h5tools_detect_vlen(mtype1_id))
- H5Dvlen_reclaim(mtype1_id, space1_id, H5P_DEFAULT, buf1);
+ H5Treclaim(mtype1_id, space1_id, H5P_DEFAULT, buf1);
HDfree(buf1);
} /* end if */
if(buf2) {
if(buf2hasdata && TRUE == h5tools_detect_vlen(mtype2_id))
- H5Dvlen_reclaim(mtype2_id, space2_id, H5P_DEFAULT, buf2);
+ H5Treclaim(mtype2_id, space2_id, H5P_DEFAULT, buf2);
HDfree(buf2);
} /* end if */
diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c
index ff542db..96f1d1a 100644
--- a/tools/lib/h5diff_dset.c
+++ b/tools/lib/h5diff_dset.c
@@ -416,10 +416,10 @@ hsize_t diff_datasetid(hid_t did1,
/* reclaim any VL memory, if necessary */
h5diffdebug2("check vl_data1:%d\n", vl_data1);
if(vl_data1)
- H5Dvlen_reclaim(m_tid1, sid1, H5P_DEFAULT, buf1);
+ H5Treclaim(m_tid1, sid1, H5P_DEFAULT, buf1);
h5diffdebug2("check vl_data2:%d\n", vl_data2);
if(vl_data2)
- H5Dvlen_reclaim(m_tid2, sid2, H5P_DEFAULT, buf2);
+ H5Treclaim(m_tid2, sid2, H5P_DEFAULT, buf2);
if(buf1 != NULL) {
HDfree(buf1);
buf1 = NULL;
@@ -510,9 +510,9 @@ hsize_t diff_datasetid(hid_t did1,
/* reclaim any VL memory, if necessary */
if(vl_data1)
- H5Dvlen_reclaim(m_tid1, sm_space, H5P_DEFAULT, sm_buf1);
+ H5Treclaim(m_tid1, sm_space, H5P_DEFAULT, sm_buf1);
if(vl_data2)
- H5Dvlen_reclaim(m_tid2, sm_space, H5P_DEFAULT, sm_buf2);
+ H5Treclaim(m_tid2, sm_space, H5P_DEFAULT, sm_buf2);
/* calculate the next hyperslab offset */
for(i = rank1, carry = 1; i > 0 && carry; --i) {
@@ -550,28 +550,28 @@ done:
if(buf1 != NULL) {
/* reclaim any VL memory, if necessary */
if(vl_data1)
- H5Dvlen_reclaim(m_tid1, sid1, H5P_DEFAULT, buf1);
+ H5Treclaim(m_tid1, sid1, H5P_DEFAULT, buf1);
HDfree(buf1);
buf1 = NULL;
}
if(buf2 != NULL) {
/* reclaim any VL memory, if necessary */
if(vl_data2)
- H5Dvlen_reclaim(m_tid2, sid2, H5P_DEFAULT, buf2);
+ H5Treclaim(m_tid2, sid2, H5P_DEFAULT, buf2);
HDfree(buf2);
buf2 = NULL;
}
if(sm_buf1 != NULL) {
/* reclaim any VL memory, if necessary */
if(vl_data1)
- H5Dvlen_reclaim(m_tid1, sm_space, H5P_DEFAULT, sm_buf1);
+ H5Treclaim(m_tid1, sm_space, H5P_DEFAULT, sm_buf1);
HDfree(sm_buf1);
sm_buf1 = NULL;
}
if(sm_buf2 != NULL) {
/* reclaim any VL memory, if necessary */
if(vl_data2)
- H5Dvlen_reclaim(m_tid2, sm_space, H5P_DEFAULT, sm_buf2);
+ H5Treclaim(m_tid2, sm_space, H5P_DEFAULT, sm_buf2);
HDfree(sm_buf2);
sm_buf2 = NULL;
}
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c
index eaac94a..ebe5c4a 100644
--- a/tools/lib/h5tools_dump.c
+++ b/tools/lib/h5tools_dump.c
@@ -1256,7 +1256,7 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c
/* Reclaim any VL memory, if necessary */
if (vl_data)
- H5Dvlen_reclaim(p_type, sm_space, H5P_DEFAULT, sm_buf);
+ H5Treclaim(p_type, sm_space, H5P_DEFAULT, sm_buf);
if(H5Sclose(sm_space) < 0)
H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sclose failed");
@@ -1645,7 +1645,7 @@ h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info, h5tools_cont
/* Reclaim any VL memory, if necessary */
if (vl_data)
- H5Dvlen_reclaim(p_type, sm_space, H5P_DEFAULT, sm_buf);
+ H5Treclaim(p_type, sm_space, H5P_DEFAULT, sm_buf);
/* Calculate the next hyperslab offset */
for (i = ctx->ndims, carry = 1; i > 0 && carry; --i) {
@@ -2345,9 +2345,13 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
if (H5Tequal(type, H5T_STD_REF_DSETREG) == TRUE) {
h5tools_str_append(buffer, " { H5T_STD_REF_DSETREG }");
}
- else {
+ else if (H5Tequal(type, H5T_STD_REF_OBJ) == TRUE) {
h5tools_str_append(buffer, " { H5T_STD_REF_OBJECT }");
}
+ else if (H5Tequal(type, H5T_STD_REF) == TRUE) {
+ h5tools_str_append(buffer, " { H5T_STD_REF }");
+ } else
+ h5tools_str_append(buffer, " { UNDEFINED }");
break;
case H5T_ENUM:
@@ -3979,7 +3983,7 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info,
/* Reclaim any VL memory, if necessary */
if (vl_data)
- H5Dvlen_reclaim(p_type, space, H5P_DEFAULT, buf);
+ H5Treclaim(p_type, space, H5P_DEFAULT, buf);
HDfree(buf);
}
diff --git a/tools/src/h5dump/h5dump_xml.c b/tools/src/h5dump/h5dump_xml.c
index c4fd948..be9e727 100644
--- a/tools/src/h5dump/h5dump_xml.c
+++ b/tools/src/h5dump/h5dump_xml.c
@@ -1919,7 +1919,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED * sset,
}
/* Reclaim any VL memory, if necessary */
if (vl_data)
- H5Dvlen_reclaim(p_type, space, H5P_DEFAULT, buf);
+ H5Treclaim(p_type, space, H5P_DEFAULT, buf);
HDfree(buf);
}
@@ -3099,7 +3099,7 @@ xml_print_strs(hid_t did, int source)
HDfree(onestring);
if (buf) {
if (is_vlstr)
- H5Dvlen_reclaim(type, space, H5P_DEFAULT, buf);
+ H5Treclaim(type, space, H5P_DEFAULT, buf);
HDfree(buf);
}
H5Tclose(type);
diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c
index 3b0001d..5c9c693 100644
--- a/tools/src/h5ls/h5ls.c
+++ b/tools/src/h5ls/h5ls.c
@@ -1568,7 +1568,7 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain
/* Reclaim any VL memory, if necessary */
if (vl_data)
- H5Dvlen_reclaim(p_type, space, H5P_DEFAULT, buf);
+ H5Treclaim(p_type, space, H5P_DEFAULT, buf);
HDfree(buf);
}
diff --git a/tools/src/h5repack/h5repack.c b/tools/src/h5repack/h5repack.c
index 0183cbf..5f688d9 100644
--- a/tools/src/h5repack/h5repack.c
+++ b/tools/src/h5repack/h5repack.c
@@ -486,7 +486,7 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, trav_table_
/* Check if we have VL data and string in the attribute's datatype that must
* be reclaimed */
if (TRUE == h5tools_detect_vlen(wtype_id))
- H5Dvlen_reclaim(wtype_id, space_id, H5P_DEFAULT, buf);
+ H5Treclaim(wtype_id, space_id, H5P_DEFAULT, buf);
HDfree(buf);
buf = NULL;
} /*H5T_REFERENCE*/
@@ -519,7 +519,9 @@ done:
* datatype that must be reclaimed
*/
if (TRUE == h5tools_detect_vlen(wtype_id))
- H5Dvlen_reclaim(wtype_id, space_id, H5P_DEFAULT, buf);
+ H5Treclaim(wtype_id, space_id, H5P_DEFAULT, buf);
+
+ /* Free buf */
HDfree(buf);
}
diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c
index f6409e3..24f67db 100644
--- a/tools/src/h5repack/h5repack_copy.c
+++ b/tools/src/h5repack/h5repack_copy.c
@@ -918,8 +918,8 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
/* Check if we have VL data in the dataset's
* datatype that must be reclaimed */
if (TRUE == H5Tdetect_class(wtype_id, H5T_VLEN))
- if (H5Dvlen_reclaim(wtype_id, f_space_id, H5P_DEFAULT, buf) < 0)
- HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dvlen_reclaim failed");
+ if (H5Treclaim(wtype_id, f_space_id, H5P_DEFAULT, buf) < 0)
+ HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Treclaim failed");
if (buf != NULL) { /* TODO: is buf potentially released by H5Dvlen_reclaim()? */
HDfree(buf);
@@ -1010,7 +1010,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
/* reclaim any VL memory, if necessary */
if (vl_data)
- H5Dvlen_reclaim(wtype_id, hslab_space, H5P_DEFAULT, hslab_buf);
+ H5Treclaim(wtype_id, hslab_space, H5P_DEFAULT, hslab_buf);
/* calculate the next hyperslab offset */
for (k = rank, carry = 1; k > 0 && carry; --k) {
diff --git a/tools/src/h5repack/h5repack_refs.c b/tools/src/h5repack/h5repack_refs.c
index 7e8951f..bfc376f 100644
--- a/tools/src/h5repack/h5repack_refs.c
+++ b/tools/src/h5repack/h5repack_refs.c
@@ -712,7 +712,7 @@ static int copy_refs_attr(hid_t loc_in,
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Awrite failed");
if (is_ref_vlen && buf)
- H5Dvlen_reclaim (mtype_id, space_id, H5P_DEFAULT, buf);
+ H5Treclaim (mtype_id, space_id, H5P_DEFAULT, buf);
} /* if (nelmts) */
if (refbuf == buf)
diff --git a/tools/test/h5copy/h5copygentest.c b/tools/test/h5copy/h5copygentest.c
index f6aa72f..a3acdae 100644
--- a/tools/test/h5copy/h5copygentest.c
+++ b/tools/test/h5copy/h5copygentest.c
@@ -261,7 +261,7 @@ static void gent_named_vl(hid_t loc_id)
H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
/* close */
- H5Dvlen_reclaim(tid,sid,H5P_DEFAULT,buf);
+ H5Treclaim(tid,sid,H5P_DEFAULT,buf);
H5Sclose(sid);
H5Dclose(did);
H5Tclose(tid);
@@ -314,7 +314,7 @@ static void gent_nested_vl(hid_t loc_id)
H5Dwrite(did, tid2, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
/* close */
- H5Dvlen_reclaim(tid2,sid,H5P_DEFAULT,buf);
+ H5Treclaim(tid2,sid,H5P_DEFAULT,buf);
H5Sclose(sid);
H5Dclose(did);
H5Tclose(tid1);
diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake
index 93dfd72..57bcd12 100644
--- a/tools/test/h5diff/CMakeTests.cmake
+++ b/tools/test/h5diff/CMakeTests.cmake
@@ -426,7 +426,7 @@
if (last_test)
set_tests_properties (MPI_TEST_H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
endif ()
- set (last_test "PH5DIFF-${resultfile}")
+ set (last_test "MPI_TEST_H5DIFF-${resultfile}")
endif ()
endmacro ()
diff --git a/tools/test/h5diff/h5diffgentest.c b/tools/test/h5diff/h5diffgentest.c
index d60e393..c711013 100644
--- a/tools/test/h5diff/h5diffgentest.c
+++ b/tools/test/h5diff/h5diffgentest.c
@@ -4403,7 +4403,7 @@ static void test_comps_vlen(const char * fname, const char *dset, const char *at
assert(ret >= 0);
/* Reclaim the write VL data */
- ret = H5Dvlen_reclaim(tid_cmpd1, sid_dset, H5P_DEFAULT, wdata);
+ ret = H5Treclaim(tid_cmpd1, sid_dset, H5P_DEFAULT, wdata);
assert(ret >= 0);
/* ----------------
@@ -4537,7 +4537,7 @@ static void test_comps_array_vlen(const char * fname, const char *dset, const ch
assert(ret >= 0);
/* Reclaim the write VL data */
- ret = H5Dvlen_reclaim(tid_cmpd1, sid_dset, H5P_DEFAULT, wdata);
+ ret = H5Treclaim(tid_cmpd1, sid_dset, H5P_DEFAULT, wdata);
assert(ret >= 0);
/*-------------------
@@ -4680,7 +4680,7 @@ static void test_comps_vlen_arry(const char * fname, const char *dset, const cha
assert(ret >= 0);
/* Reclaim the write VL data */
- ret = H5Dvlen_reclaim(tid_cmpd1, sid_dset, H5P_DEFAULT, wdata);
+ ret = H5Treclaim(tid_cmpd1, sid_dset, H5P_DEFAULT, wdata);
assert(ret >= 0);
/* ----------------
@@ -5446,7 +5446,7 @@ void write_attr_strings(hid_t loc_id, const char* dset_name, hid_t fid, int make
aid = H5Acreate2(loc_id, "vlen", tid, sid, H5P_DEFAULT, H5P_DEFAULT);
status = H5Awrite(aid, tid, buf5);
assert(status >= 0);
- status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf5);
+ status = H5Treclaim(tid, sid, H5P_DEFAULT, buf5);
assert(status >= 0);
status = H5Aclose(aid);
status = H5Tclose(tid);
@@ -5712,7 +5712,7 @@ void write_attr_strings(hid_t loc_id, const char* dset_name, hid_t fid, int make
aid = H5Acreate2(loc_id, "vlen2D", tid, sid, H5P_DEFAULT, H5P_DEFAULT);
status = H5Awrite(aid, tid, buf52);
assert(status >= 0);
- status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf52);
+ status = H5Treclaim(tid, sid, H5P_DEFAULT, buf52);
assert(status >= 0);
status = H5Aclose(aid);
status = H5Tclose(tid);
@@ -6108,7 +6108,7 @@ void write_attr_strings(hid_t loc_id, const char* dset_name, hid_t fid, int make
aid = H5Acreate2(loc_id, "vlen3D", tid, sid, H5P_DEFAULT, H5P_DEFAULT);
status = H5Awrite(aid, tid, buf53);
assert(status >= 0);
- status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf53);
+ status = H5Treclaim(tid, sid, H5P_DEFAULT, buf53);
assert(status >= 0);
status = H5Aclose(aid);
status = H5Tclose(tid);
@@ -6434,7 +6434,7 @@ void write_attr_in(hid_t loc_id, const char* dset_name, hid_t fid, int make_diff
aid = H5Acreate2(loc_id, "vlen", tid, sid, H5P_DEFAULT, H5P_DEFAULT);
status = H5Awrite(aid, tid, buf5);
assert(status >= 0);
- status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf5);
+ status = H5Treclaim(tid, sid, H5P_DEFAULT, buf5);
assert(status >= 0);
status = H5Aclose(aid);
status = H5Tclose(tid);
@@ -6702,7 +6702,7 @@ void write_attr_in(hid_t loc_id, const char* dset_name, hid_t fid, int make_diff
aid = H5Acreate2(loc_id, "vlen2D", tid, sid, H5P_DEFAULT, H5P_DEFAULT);
status = H5Awrite(aid, tid, buf52);
assert(status >= 0);
- status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf52);
+ status = H5Treclaim(tid, sid, H5P_DEFAULT, buf52);
assert(status >= 0);
status = H5Aclose(aid);
status = H5Tclose(tid);
@@ -7100,7 +7100,7 @@ void write_attr_in(hid_t loc_id, const char* dset_name, hid_t fid, int make_diff
aid = H5Acreate2(loc_id, "vlen3D", tid, sid, H5P_DEFAULT, H5P_DEFAULT);
status = H5Awrite(aid, tid, buf53);
assert(status >= 0);
- status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf53);
+ status = H5Treclaim(tid, sid, H5P_DEFAULT, buf53);
assert(status >= 0);
status = H5Aclose(aid);
status = H5Tclose(tid);
@@ -7395,7 +7395,7 @@ void write_dset_in(hid_t loc_id, const char* dset_name, hid_t fid, int make_diff
H5P_DEFAULT);
status = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf5);
HDassert(status >= 0);
- status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf5);
+ status = H5Treclaim(tid, sid, H5P_DEFAULT, buf5);
HDassert(status >= 0);
status = H5Dclose(did);
status = H5Tclose(tid);
@@ -7580,7 +7580,7 @@ void write_dset_in(hid_t loc_id, const char* dset_name, hid_t fid, int make_diff
did = H5Dcreate2(loc_id, "vlen2D", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf52);
assert(status >= 0);
- status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf52);
+ status = H5Treclaim(tid, sid, H5P_DEFAULT, buf52);
assert(status >= 0);
status = H5Dclose(did);
status = H5Tclose(tid);
@@ -7759,7 +7759,7 @@ void write_dset_in(hid_t loc_id, const char* dset_name, hid_t fid, int make_diff
did = H5Dcreate2(loc_id, "vlen3D", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf53);
assert(status >= 0);
- status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf53);
+ status = H5Treclaim(tid, sid, H5P_DEFAULT, buf53);
assert(status >= 0);
status = H5Dclose(did);
status = H5Tclose(tid);
diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c
index 35c3e3c..ad70770 100644
--- a/tools/test/h5dump/h5dumpgentest.c
+++ b/tools/test/h5dump/h5dumpgentest.c
@@ -2624,7 +2624,7 @@ static void gent_vldatatypes(void)
dset = H5Dcreate2(file, "Dataset1.0", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
ret = H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
HDassert(ret >= 0);
- ret = H5Dvlen_reclaim(type, space, H5P_DEFAULT, wdata);
+ ret = H5Treclaim(type, space, H5P_DEFAULT, wdata);
HDassert(ret >= 0);
ret = H5Dclose(dset);
@@ -2651,7 +2651,7 @@ static void gent_vldatatypes(void)
dset = H5Dcreate2(file, "Dataset2.0", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
ret = H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
HDassert(ret >= 0);
- ret = H5Dvlen_reclaim(type, space, H5P_DEFAULT, wdata);
+ ret = H5Treclaim(type, space, H5P_DEFAULT, wdata);
HDassert(ret >= 0);
ret = H5Dclose(dset);
@@ -2674,7 +2674,7 @@ static void gent_vldatatypes(void)
dset = H5Dcreate2(file, "Dataset3.0", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
ret = H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, &adata);
HDassert(ret >= 0);
- ret = H5Dvlen_reclaim(type, space, H5P_DEFAULT, &adata);
+ ret = H5Treclaim(type, space, H5P_DEFAULT, &adata);
HDassert(ret >= 0);
ret = H5Dclose(dset);
@@ -2740,7 +2740,7 @@ gent_vldatatypes2(void)
HDassert(ret >= 0);
/* Reclaim the write VL data */
- ret = H5Dvlen_reclaim(tid2, sid1, H5P_DEFAULT, wdata);
+ ret = H5Treclaim(tid2, sid1, H5P_DEFAULT, wdata);
HDassert(ret >= 0);
/* Close Dataset */
@@ -2811,7 +2811,7 @@ static void gent_vldatatypes3(void)
HDassert(ret >= 0);
/* Reclaim the write VL data */
- ret = H5Dvlen_reclaim(tid2, sid1, H5P_DEFAULT, wdata);
+ ret = H5Treclaim(tid2, sid1, H5P_DEFAULT, wdata);
HDassert(ret >= 0);
/* Close Dataset */
@@ -2878,7 +2878,7 @@ static void gent_vldatatypes4(void)
HDassert(ret >= 0);
/* Reclaim the write VL data */
- ret = H5Dvlen_reclaim(tid1, sid1, H5P_DEFAULT, wdata);
+ ret = H5Treclaim(tid1, sid1, H5P_DEFAULT, wdata);
HDassert(ret >= 0);
/* Close Dataset */
@@ -2942,7 +2942,7 @@ static void gent_vldatatypes5(void)
ret = H5Dclose(dataset);
HDassert(ret >= 0);
- ret = H5Dvlen_reclaim(tid1, sid1, H5P_DEFAULT, wdata);
+ ret = H5Treclaim(tid1, sid1, H5P_DEFAULT, wdata);
HDassert(ret >= 0);
ret = H5Tclose(tid1);
@@ -3385,7 +3385,7 @@ static void gent_array6(void)
HDassert(ret >= 0);
/* Reclaim the write VL data */
- ret = H5Dvlen_reclaim(tid1, sid1, H5P_DEFAULT, wdata);
+ ret = H5Treclaim(tid1, sid1, H5P_DEFAULT, wdata);
HDassert(ret >= 0);
/* Close Dataset */
@@ -3454,7 +3454,7 @@ static void gent_array7(void)
HDassert(ret >= 0);
/* Reclaim the write VL data */
- ret = H5Dvlen_reclaim(tid1, sid1, H5P_DEFAULT, wdata);
+ ret = H5Treclaim(tid1, sid1, H5P_DEFAULT, wdata);
HDassert(ret >= 0);
/* Close Dataset */
@@ -4054,7 +4054,7 @@ static void write_attr_in(hid_t loc_id,
aid = H5Acreate2(loc_id, "vlen", tid, sid, H5P_DEFAULT, H5P_DEFAULT);
status = H5Awrite(aid, tid, buf5);
HDassert(status >= 0);
- status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf5);
+ status = H5Treclaim(tid, sid, H5P_DEFAULT, buf5);
HDassert(status >= 0);
status = H5Aclose(aid);
status = H5Tclose(tid);
@@ -4165,7 +4165,7 @@ static void write_attr_in(hid_t loc_id,
aid = H5Acreate2(loc_id, "vlen2D", tid, sid, H5P_DEFAULT, H5P_DEFAULT);
status = H5Awrite(aid, tid, buf52);
HDassert(status >= 0);
- status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf52);
+ status = H5Treclaim(tid, sid, H5P_DEFAULT, buf52);
HDassert(status >= 0);
status = H5Aclose(aid);
status = H5Tclose(tid);
@@ -4298,7 +4298,7 @@ static void write_attr_in(hid_t loc_id,
aid = H5Acreate2(loc_id, "vlen3D", tid, sid, H5P_DEFAULT, H5P_DEFAULT);
status = H5Awrite(aid, tid, buf53);
HDassert(status >= 0);
- status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf53);
+ status = H5Treclaim(tid, sid, H5P_DEFAULT, buf53);
HDassert(status >= 0);
status = H5Aclose(aid);
status = H5Tclose(tid);
@@ -4496,7 +4496,7 @@ static void write_dset_in(hid_t loc_id,
did = H5Dcreate2(loc_id, "vlen", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf5);
HDassert(status >= 0);
- status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf5);
+ status = H5Treclaim(tid, sid, H5P_DEFAULT, buf5);
HDassert(status >= 0);
status = H5Dclose(did);
status = H5Tclose(tid);
@@ -4606,7 +4606,7 @@ static void write_dset_in(hid_t loc_id,
did = H5Dcreate2(loc_id, "vlen2D", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf52);
HDassert(status >= 0);
- status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf52);
+ status = H5Treclaim(tid, sid, H5P_DEFAULT, buf52);
HDassert(status >= 0);
status = H5Dclose(did);
status = H5Tclose(tid);
@@ -4745,7 +4745,7 @@ static void write_dset_in(hid_t loc_id,
did = H5Dcreate2(loc_id, "vlen3D", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf53);
HDassert(status >= 0);
- status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf53);
+ status = H5Treclaim(tid, sid, H5P_DEFAULT, buf53);
HDassert(status >= 0);
status = H5Dclose(did);
status = H5Tclose(tid);
@@ -5966,7 +5966,7 @@ static void gent_fvalues(void)
did = H5Dcreate2(fid, "fill_vlen", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
ret = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf3);
HDassert(ret >= 0);
- ret = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf3);
+ ret = H5Treclaim(tid, sid, H5P_DEFAULT, buf3);
HDassert(ret >= 0);
ret = H5Dclose(did);
ret = H5Tclose(tid);
diff --git a/tools/test/h5dump/testh5dump.sh.in b/tools/test/h5dump/testh5dump.sh.in
index e5680cf..141715c 100644
--- a/tools/test/h5dump/testh5dump.sh.in
+++ b/tools/test/h5dump/testh5dump.sh.in
@@ -906,12 +906,14 @@ TOOLTEST_HELP() {
}
# Call the h5dump tool and grep for a value
-#
+# txttype ERRTXT greps test error output, otherwise greps test output
GREPTEST()
{
- expectdata=$1
- actual=$TESTDIR/$2
- actual_err="$TESTDIR/`basename $2 .ddl`.oerr"
+ txttype=$1
+ expectdata=$2
+ actual=$TESTDIR/$3
+ actual_err="$TESTDIR/`basename $3 .ddl`.oerr"
+ shift
shift
shift
@@ -921,7 +923,11 @@ GREPTEST()
cd $TESTDIR
$ENVCMD $RUNSERIAL $DUMPER_BIN -p "$@"
) >$actual 2>$actual_err
- $GREP $expectdata $actual > /dev/null
+ if [[ "$txttype" = "ERRTXT" ]]; then
+ $GREP "$expectdata" $actual_err > /dev/null
+ else
+ $GREP "$expectdata" $actual > /dev/null
+ fi
if [ $? -eq 0 ]; then
echo " PASSED"
else
@@ -1137,7 +1143,7 @@ TOOLTEST tvlenstr_array.ddl --enable-error-stack tvlenstr_array.h5
# test for files with array data
TOOLTEST tarray1.ddl --enable-error-stack tarray1.h5
# # added for bug# 2092 - tarray1_big.h
-TOOLTEST4 tarray1_big.ddl --enable-error-stack -R tarray1_big.h5
+GREPTEST ERRTXT "Undefined reference pointer" tarray1_big.ddl --enable-error-stack -R tarray1_big.h5
TOOLTEST tarray2.ddl --enable-error-stack tarray2.h5
TOOLTEST tarray3.ddl --enable-error-stack tarray3.h5
TOOLTEST tarray4.ddl --enable-error-stack tarray4.h5
@@ -1345,9 +1351,9 @@ fi
# test for dataset region references
TOOLTEST tdatareg.ddl --enable-error-stack tdatareg.h5
-TOOLTEST4 tdataregR.ddl --enable-error-stack -R tdatareg.h5
+GREPTEST ERRTXT "Undefined reference pointer" tdataregR.ddl --enable-error-stack -R tdatareg.h5
TOOLTEST tattrreg.ddl --enable-error-stack tattrreg.h5
-TOOLTEST4 tattrregR.ddl --enable-error-stack -R tattrreg.h5
+GREPTEST ERRTXT "Undefined reference pointer" tattrregR.ddl --enable-error-stack -R tattrreg.h5
TOOLTEST2 tbinregR.exp --enable-error-stack -d /Dataset1 -s 0 -R -y -o tbinregR.txt tdatareg.h5
# Clean up text output files
@@ -1396,7 +1402,7 @@ TOOLTEST3 non_existing.ddl --enable-error-stack tgroup.h5 non_existing.h5
TOOLTEST err_attr_dspace.ddl err_attr_dspace.h5
# test to verify HDFFV-9407: long double full precision
-GREPTEST "1.123456789012345" t128bit_float.ddl -m %.35Lf t128bit_float.h5
+GREPTEST OUTTXT "1.123456789012345" t128bit_float.ddl -m %.35Lf t128bit_float.h5
# Clean up temporary files/directories
CLEAN_TESTFILES_AND_TESTDIR
diff --git a/tools/test/h5repack/h5repackgentest.c b/tools/test/h5repack/h5repackgentest.c
index 12883b7..aaac285 100644
--- a/tools/test/h5repack/h5repackgentest.c
+++ b/tools/test/h5repack/h5repackgentest.c
@@ -42,7 +42,10 @@
#define FILE_UINT8BE "h5repack_uint8be"
#define FILE_F32LE "h5repack_f32le"
-#define H5REPACKGENTEST_OOPS ret_value = -1; goto done;
+#define H5REPACKGENTEST_OOPS { \
+ ret_value = -1; \
+ goto done; \
+}
#define H5REPACKGENTEST_COMMON_CLEANUP(dcpl, file, space) { \
if ((dcpl) != H5P_DEFAULT && (dcpl) != H5I_INVALID_HID) { \
@@ -53,58 +56,37 @@
}
struct external_def {
- hsize_t type_size;
+ hsize_t type_size;
unsigned n_elts_per_file;
unsigned n_elts_total;
};
-
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* Helper function to create and write a dataset to file.
* Returns 0 on success, -1 on failure.
*/
static int
-__make_dataset(
- hid_t file_id,
- const char *dset_name,
- hid_t mem_type_id,
- hid_t space_id,
- hid_t dcpl_id,
- void *wdata)
-{
- hid_t dset_id = H5I_INVALID_HID;
+__make_dataset(hid_t file_id, const char *dset_name,
+ hid_t mem_type_id, hid_t space_id, hid_t dcpl_id, void *wdata) {
+ hid_t dset_id = H5I_INVALID_HID;
int ret_value = 0;
- dset_id = H5Dcreate2(
- file_id,
- dset_name,
- mem_type_id,
- space_id,
- H5P_DEFAULT,
- dcpl_id,
- H5P_DEFAULT);
- if (dset_id == H5I_INVALID_HID) {
+ dset_id = H5Dcreate2(file_id, dset_name, mem_type_id, space_id,
+ H5P_DEFAULT, dcpl_id,
+ H5P_DEFAULT);
+ if (dset_id == H5I_INVALID_HID)
H5REPACKGENTEST_OOPS;
- }
- if (H5Dwrite(
- dset_id,
- mem_type_id,
- H5S_ALL,
- H5S_ALL,
- H5P_DEFAULT,
- wdata)
- < 0)
- {
+ if (H5Dwrite(dset_id, mem_type_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata) < 0)
H5REPACKGENTEST_OOPS;
- }
done:
- if (dset_id != H5I_INVALID_HID) { (void)H5Dclose(dset_id); }
+ if (dset_id != H5I_INVALID_HID)
+ (void) H5Dclose(dset_id);
+
return ret_value;
} /* end __make_dataset() */
-
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* Helper function to populate the DCPL external storage list.
* Creates external files for the DCPL, with each file name following the
@@ -114,38 +96,30 @@ done:
* Returns 0 on success, -1 on failure.
*/
static int
-__set_dcpl_external_list(
- hid_t dcpl,
- const char *filename,
- unsigned n_elts_per_file,
- unsigned n_elts_total,
- hsize_t elt_size)
-{
+__set_dcpl_external_list(hid_t dcpl, const char *filename,
+ unsigned n_elts_per_file, unsigned n_elts_total, hsize_t elt_size) {
char name[MAX_NAME_SIZE];
unsigned n_external_files = 0;
unsigned i = 0;
- if (NULL == filename || '\0' == *filename) {
+ if (NULL == filename || '\0' == *filename)
return -1;
- }
n_external_files = n_elts_total / n_elts_per_file;
- if (n_elts_total != (n_external_files * n_elts_per_file)) {
+ if (n_elts_total != (n_external_files * n_elts_per_file))
return -1;
- }
+
for (i = 0; i < n_external_files; i++) {
- if (snprintf(name, MAX_NAME_SIZE, "%s_ex-%u.dat", filename, i) >= MAX_NAME_SIZE) {
+ if (HDsnprintf(name, MAX_NAME_SIZE, "%s_ex-%u.dat", filename, i) >= MAX_NAME_SIZE)
return -1;
- }
- if (H5Pset_external(dcpl, name, 0, n_elts_per_file * elt_size) < 0) {
+
+ if (H5Pset_external(dcpl, name, 0, n_elts_per_file * elt_size) < 0)
return -1;
- }
}
return 0;
} /* end __set_dcpl_external_list() */
-
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* Generalized utility function to write a file with the specified data and
* dataset configuration. If `ext` is provided, will attempt to use external
@@ -153,141 +127,102 @@ __set_dcpl_external_list(
* Returns 0 on success, -1 on failure.
*/
static int
-__make_file(
- const char *basename,
- struct external_def *ext,
- hid_t type_id,
- hsize_t rank,
- hsize_t *dims,
- void *wdata)
-{
- char filename[MAX_NAME_SIZE];
- hid_t file_id = H5I_INVALID_HID;
- hid_t dcpl_id = H5P_DEFAULT;
- hid_t space_id = H5I_INVALID_HID;
- int ret_value = 0;
+__make_file(const char *basename, struct external_def *ext,
+ hid_t type_id, hsize_t rank, hsize_t *dims, void *wdata) {
+ char filename[MAX_NAME_SIZE];
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t dcpl_id = H5P_DEFAULT;
+ hid_t space_id = H5I_INVALID_HID;
+ int ret_value = 0;
- if (snprintf(filename,
- MAX_NAME_SIZE,
- "%s%s.h5",
- basename,
- (NULL != ext) ? "_ex" : "")
- >= MAX_NAME_SIZE)
- {
+ if (HDsnprintf(filename, MAX_NAME_SIZE, "%s%s.h5", basename, (NULL != ext) ? "_ex" : "") >= MAX_NAME_SIZE)
H5REPACKGENTEST_OOPS;
- }
if (NULL != ext) {
dcpl_id = H5Pcreate(H5P_DATASET_CREATE);
- if (dcpl_id == H5I_INVALID_HID) {
+ if (dcpl_id == H5I_INVALID_HID)
H5REPACKGENTEST_OOPS;
- }
- if (__set_dcpl_external_list(
- dcpl_id,
- basename,
- ext->n_elts_per_file,
- ext->n_elts_total,
- ext->type_size)
- < 0)
- {
+
+ if (__set_dcpl_external_list(dcpl_id, basename, ext->n_elts_per_file, ext->n_elts_total, ext->type_size) < 0)
H5REPACKGENTEST_OOPS;
- }
}
space_id = H5Screate_simple(rank, dims, NULL);
- if (space_id == H5I_INVALID_HID) {
+ if (space_id == H5I_INVALID_HID)
H5REPACKGENTEST_OOPS;
- }
file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- if (file_id == H5I_INVALID_HID) {
+ if (file_id == H5I_INVALID_HID)
H5REPACKGENTEST_OOPS;
- }
- if (__make_dataset(
- file_id,
- "dset",
- type_id,
- space_id,
- dcpl_id,
- wdata)
- < 0)
- {
+
+ if (__make_dataset(file_id, "dset", type_id, space_id, dcpl_id, wdata) < 0)
H5REPACKGENTEST_OOPS;
- }
done:
H5REPACKGENTEST_COMMON_CLEANUP(dcpl_id, file_id, space_id);
- return ret_value;
+return ret_value;
} /* end __make_file() */
-
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* Returns 0 on success, -1 on failure.
*/
static int
-generate_int32le_1d(hbool_t external)
-{
- int32_t wdata[12];
- hsize_t dims[] = {12};
- struct external_def *def_ptr = NULL;
- struct external_def def = { (hsize_t)sizeof(int32_t), 6, 12 };
- int32_t n = 0;
- int ret_value = 0;
+generate_int32le_1d(hbool_t external) {
+ int32_t wdata[12];
+ hsize_t dims[] = { 12 };
+ struct external_def *def_ptr = NULL;
+ struct external_def def = { (hsize_t) sizeof(int32_t), 6, 12 };
+ int32_t n = 0;
+ int ret_value = 0;
/* Generate values
- */
+ */
for (n = 0; n < 12; n++) {
- wdata[n] = n-6;
+ wdata[n] = n - 6;
}
def_ptr = (TRUE == external) ? (&def) : NULL;
- if (__make_file(FILE_INT32LE_1, def_ptr, H5T_STD_I32LE, 1, dims, wdata) < 0) {
+ if (__make_file(FILE_INT32LE_1, def_ptr, H5T_STD_I32LE, 1, dims, wdata) < 0)
ret_value = -1;
- }
return ret_value;
} /* end generate_int32le_1d() */
-
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* Returns 0 on success, -1 on failure.
*/
static int
-generate_int32le_2d(hbool_t external)
-{
- int32_t wdata[64];
- hsize_t dims[] = {8, 8};
- struct external_def *def_ptr = NULL;
- struct external_def def = { (hsize_t)sizeof(int32_t), 64, 64 };
- int32_t n = 0;
- int ret_value = 0;
+generate_int32le_2d(hbool_t external) {
+ int32_t wdata[64];
+ hsize_t dims[] = { 8, 8 };
+ struct external_def *def_ptr = NULL;
+ struct external_def def = { (hsize_t) sizeof(int32_t), 64, 64 };
+ int32_t n = 0;
+ int ret_value = 0;
/* Generate values
- */
+ */
for (n = 0; n < 64; n++) {
- wdata[n] = n-32;
+ wdata[n] = n - 32;
}
def_ptr = (TRUE == external) ? (&def) : NULL;
- if (__make_file(FILE_INT32LE_2, def_ptr, H5T_STD_I32LE, 2, dims, wdata) < 0) {
+ if (__make_file(FILE_INT32LE_2, def_ptr, H5T_STD_I32LE, 2, dims, wdata) < 0)
ret_value = -1;
- }
return ret_value;
} /* end generate_int32le_2d() */
-
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* Returns 0 on success, -1 on failure.
*/
static int
-generate_int32le_3d(hbool_t external)
-{
- hsize_t dims[] = {8, 8, 8};
- int32_t wdata[512]; /* 8^3, from dims */
+generate_int32le_3d(hbool_t external) {
+ hsize_t dims[] = { 8, 8, 8 };
+ int32_t wdata[512]; /* 8^3, from dims */
struct external_def *def_ptr = NULL;
- struct external_def def = { (hsize_t)sizeof(int32_t), 512, 512 };
+ struct external_def def = { (hsize_t) sizeof(int32_t), 512, 512 };
int32_t n = 0;
int i = 0;
int j = 0;
@@ -295,34 +230,31 @@ generate_int32le_3d(hbool_t external)
int ret_value = 0;
/* generate values, alternating positive and negative
- */
- for (i=0, n=0; i < dims[0]; i++) {
- for (j=0; j < dims[1]; j++) {
- for (k=0; k < dims[2]; k++, n++) {
- wdata[n] = (k + j*512 + i*4096) * ((n&1) ? (-1) : (1));
+ */
+ for (i = 0, n = 0; i < dims[0]; i++) {
+ for (j = 0; j < dims[1]; j++) {
+ for (k = 0; k < dims[2]; k++, n++) {
+ wdata[n] = (k + j * 512 + i * 4096) * ((n & 1) ? (-1) : (1));
}
}
}
def_ptr = (TRUE == external) ? (&def) : NULL;
- if (__make_file(FILE_INT32LE_3, def_ptr, H5T_STD_I32LE, 3, dims, wdata) < 0) {
+ if (__make_file(FILE_INT32LE_3, def_ptr, H5T_STD_I32LE, 3, dims, wdata) < 0)
ret_value = -1;
- }
return ret_value;
} /* end generate_int32le_3d() */
-
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* Returns 0 on success, -1 on failure.
*/
static int
-generate_uint8be(hbool_t external)
-{
- hsize_t dims[] = {4, 8, 8};
- uint8_t wdata[256]; /* 4*8*8, from dims */
+generate_uint8be(hbool_t external) {
+ hsize_t dims[] = { 4, 8, 8 };
+ uint8_t wdata[256]; /* 4*8*8, from dims */
struct external_def *def_ptr = NULL;
- struct external_def def = { (hsize_t)sizeof(uint8_t), 64, 256 };
+ struct external_def def = { (hsize_t) sizeof(uint8_t), 64, 256 };
uint8_t n = 0;
int i = 0;
int j = 0;
@@ -330,84 +262,79 @@ generate_uint8be(hbool_t external)
int ret_value = 0;
/* Generate values, ping-pong from ends of range
- */
- for (i=0, n=0; i < dims[0]; i++) {
- for (j=0; j < dims[1]; j++) {
- for (k=0; k < dims[2]; k++, n++) {
- wdata[n] = n * ((n&1) ? (-1) : (1));
+ */
+ for (i = 0, n = 0; i < dims[0]; i++) {
+ for (j = 0; j < dims[1]; j++) {
+ for (k = 0; k < dims[2]; k++, n++) {
+ wdata[n] = n * ((n & 1) ? (-1) : (1));
}
}
}
def_ptr = (TRUE == external) ? (&def) : NULL;
- if (__make_file(FILE_UINT8BE, def_ptr, H5T_STD_U8BE, 3, dims, wdata) < 0) {
+ if (__make_file(FILE_UINT8BE, def_ptr, H5T_STD_U8BE, 3, dims, wdata) < 0)
ret_value = -1;
- }
return ret_value;
} /* end generate_uint8be() */
-
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* Returns 0 on success, -1 on failure.
*/
static int
-generate_f32le(hbool_t external)
-{
- hsize_t dims[] = {12, 6};
- float wdata[72]; /* 12*6, from dims */
+generate_f32le(hbool_t external) {
+ hsize_t dims[] = { 12, 6 };
+ float wdata[72]; /* 12*6, from dims */
struct external_def *def_ptr = NULL;
- struct external_def def = {
- (hsize_t)sizeof(float),
- 72,
- 72
- };
- float n = 0;
- int i = 0;
- int j = 0;
- int k = 0;
- int ret_value = 0;
+ struct external_def def = { (hsize_t) sizeof(float), 72, 72 };
+ float n = 0;
+ int i = 0;
+ int j = 0;
+ int k = 0;
+ int ret_value = 0;
/* Generate values */
- for (i=0, k=0, n=0; i < dims[0]; i++) {
- for (j=0; j < dims[1]; j++, k++, n++) {
+ for (i = 0, k = 0, n = 0; i < dims[0]; i++) {
+ for (j = 0; j < dims[1]; j++, k++, n++) {
wdata[k] = n * 801.1 * ((k % 5 == 1) ? (-1) : (1));
}
}
def_ptr = (TRUE == external) ? (&def) : NULL;
- if (__make_file(FILE_F32LE, def_ptr, H5T_IEEE_F32LE, 2, dims, wdata) < 0) {
+ if (__make_file(FILE_F32LE, def_ptr, H5T_IEEE_F32LE, 2, dims, wdata) < 0)
ret_value = -1;
- }
return ret_value;
} /* end generate_f32le() */
-
/* ----------------------------------------------------------------------------
* Create files.
* Return 0 on success, nonzero on failure.
*/
int
-main(void)
-{
- int i = 0;
+main(void) {
+ int i = 0;
int ret_value = 0;
- for (i=0; i < 2; i++) {
- hbool_t external = (i&1) ? TRUE : FALSE;
- if (ret_value == 0) { ret_value -= generate_int32le_1d(external); }
- if (ret_value == 0) { ret_value -= generate_int32le_2d(external); }
- if (ret_value == 0) { ret_value -= generate_int32le_3d(external); }
- if (ret_value == 0) { ret_value -= generate_uint8be(external); }
- if (ret_value == 0) { ret_value -= generate_f32le(external); }
- } /* end for external data storage or not */
+ for (i = 0; i < 2; i++) {
+ hbool_t external = (i & 1) ? TRUE : FALSE;
+ if (generate_int32le_1d(external) < 0)
+ HDprintf("A generate_int32le_1d failed!\n");
- if (ret_value != 0) {
- HDprintf("A problem occurred!\n");
- }
+ if (generate_int32le_2d(external) < 0)
+ HDprintf("A generate_int32le_2d failed!\n");
- return ret_value;
-} /* end main() */
+ if (generate_int32le_3d(external) < 0)
+ HDprintf("A generate_int32le_3d failed!\n");
+ if (generate_uint8be(external) < 0)
+ HDprintf("A generate_uint8be failed!\n");
+
+ if (generate_f32le(external) < 0)
+ HDprintf("A generate_f32le failed!\n");
+
+ } /* end for external data storage or not */
+
+ return EXIT_SUCCESS;
+} /* end main() */
diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c
index ec8df3c..f3e6cd3 100644
--- a/tools/test/h5repack/h5repacktst.c
+++ b/tools/test/h5repack/h5repacktst.c
@@ -4079,7 +4079,7 @@ int write_dset_in(hid_t loc_id,
goto out;
if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf5) < 0)
goto out;
- if (H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf5) < 0)
+ if (H5Treclaim(tid, sid, H5P_DEFAULT, buf5) < 0)
goto out;
if (H5Dclose(did) < 0)
goto out;
@@ -4312,7 +4312,7 @@ int write_dset_in(hid_t loc_id,
goto out;
if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf52) < 0)
goto out;
- if (H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf52) < 0)
+ if (H5Treclaim(tid, sid, H5P_DEFAULT, buf52) < 0)
goto out;
if (H5Dclose(did) < 0)
goto out;
@@ -4533,7 +4533,7 @@ int write_dset_in(hid_t loc_id,
if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf53) < 0)
goto out;
- if (H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf53) < 0)
+ if (H5Treclaim(tid, sid, H5P_DEFAULT, buf53) < 0)
goto out;
if (H5Dclose(did) < 0)
@@ -5009,7 +5009,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Awrite(aid, tid, buf5) < 0)
goto out;
- if (H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf5) < 0)
+ if (H5Treclaim(tid, sid, H5P_DEFAULT, buf5) < 0)
goto out;
if (H5Aclose(aid) < 0)
goto out;
@@ -5331,7 +5331,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Awrite(aid, tid, buf52) < 0)
goto out;
- if (H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf52) < 0)
+ if (H5Treclaim(tid, sid, H5P_DEFAULT, buf52) < 0)
goto out;
if (H5Aclose(aid) < 0)
goto out;
@@ -5793,7 +5793,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Awrite(aid, tid, buf53) < 0)
goto out;
- if (H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf53) < 0)
+ if (H5Treclaim(tid, sid, H5P_DEFAULT, buf53) < 0)
goto out;
if (H5Aclose(aid) < 0)
goto out;
@@ -7036,10 +7036,10 @@ static herr_t make_complex_attr_references(hid_t loc_id)
}
/* close resource for vlen data */
- status = H5Dvlen_reclaim (vlen_objref_attr_tid, vlen_objref_attr_sid, H5P_DEFAULT, vlen_objref_data);
+ status = H5Treclaim (vlen_objref_attr_tid, vlen_objref_attr_sid, H5P_DEFAULT, vlen_objref_data);
if (status < 0)
{
- HDfprintf(stderr, "Error: %s %d> H5Dvlen_reclaim failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Treclaim failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -7091,10 +7091,10 @@ static herr_t make_complex_attr_references(hid_t loc_id)
}
/* close resource for vlen data */
- status = H5Dvlen_reclaim (vlen_regref_attr_tid, vlen_regref_attr_sid, H5P_DEFAULT, vlen_regref_data);
+ status = H5Treclaim (vlen_regref_attr_tid, vlen_regref_attr_sid, H5P_DEFAULT, vlen_regref_data);
if (status < 0)
{
- HDfprintf(stderr, "Error: %s %d> H5Dvlen_reclaim failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Treclaim failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}