diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2022-05-04 15:49:01 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-04 15:49:01 (GMT) |
commit | 838d050a63d310a38f92a510dc94c0656a84bb51 (patch) | |
tree | 55fe7b05c0408ebf4b28c3bfb5cd9a1d04fb2502 /test/objcopy.c | |
parent | 19a59c29b93c04ae069881da2354d3d7048619b9 (diff) | |
download | hdf5-838d050a63d310a38f92a510dc94c0656a84bb51.zip hdf5-838d050a63d310a38f92a510dc94c0656a84bb51.tar.gz hdf5-838d050a63d310a38f92a510dc94c0656a84bb51.tar.bz2 |
h5test.h testing macros get enclosed in do..while loops (#1721)
* h5test.h testing macros get enclosed in do..while loops
* Adds missed macro in hl C++ code
* Fixes macro in Windows code
Diffstat (limited to 'test/objcopy.c')
-rw-r--r-- | test/objcopy.c | 6280 |
1 files changed, 3140 insertions, 3140 deletions
diff --git a/test/objcopy.c b/test/objcopy.c index e23ee8e..cc8f428 100644 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -285,40 +285,40 @@ attach_ref_attr(hid_t file_id, hid_t loc_id) /* creates two simple datasets */ if ((sid = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((sid_ref = H5Screate_simple(1, dims_ref, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((did1 = H5Dcreate2(file_id, dsetname1, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dwrite(did1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data1) < 0) - TEST_ERROR + TEST_ERROR; if ((did2 = H5Dcreate2(file_id, dsetname2, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dwrite(did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data2) < 0) - TEST_ERROR + TEST_ERROR; /* create an attribute with two object references */ if (H5Rcreate(&ref[0], file_id, dsetname1, H5R_OBJECT, (hid_t)-1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Rcreate(&ref[1], file_id, dsetname2, H5R_OBJECT, (hid_t)-1) < 0) - TEST_ERROR + TEST_ERROR; if ((aid = H5Acreate2(loc_id, "obj_ref_attr", H5T_STD_REF_OBJ, sid_ref, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Awrite(aid, H5T_STD_REF_OBJ, ref) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(sid_ref) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(aid) < 0) - TEST_ERROR + TEST_ERROR; return 0; @@ -369,53 +369,53 @@ attach_reg_ref_attr(hid_t file_id, hid_t loc_id) /* create a 2D dataset */ if ((space_id = H5Screate_simple(rank, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((spacer_id = H5Screate_simple(rankr, dimsr, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((dsetv_id = H5Dcreate2(file_id, dsetnamev, H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dwrite(dsetv_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data) < 0) - TEST_ERROR + TEST_ERROR; /* create reg_ref of block selection */ if (H5Sselect_hyperslab(space_id, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR; if (H5Rcreate(&ref[0], file_id, dsetnamev, H5R_DATASET_REGION, space_id) < 0) - TEST_ERROR + TEST_ERROR; /* create reg_ref of point selection */ if (H5Sselect_none(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sselect_elements(space_id, H5S_SELECT_SET, num_points, (const hsize_t *)coord) < 0) - TEST_ERROR + TEST_ERROR; if (H5Rcreate(&ref[1], file_id, dsetnamev, H5R_DATASET_REGION, space_id) < 0) - TEST_ERROR + TEST_ERROR; /* create reg_ref attribute */ if ((aid = H5Acreate2(loc_id, "reg_ref_attr", H5T_STD_REF_DSETREG, spacer_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Awrite(aid, H5T_STD_REF_DSETREG, ref) < 0) - TEST_ERROR + TEST_ERROR; /* attach the reg_ref attribute to the dataset itself */ if (H5Aclose(aid) < 0) - TEST_ERROR + TEST_ERROR; if ((aid = H5Acreate2(dsetv_id, "reg_ref_attr", H5T_STD_REF_DSETREG, spacer_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Awrite(aid, H5T_STD_REF_DSETREG, ref) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(spacer_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dsetv_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(aid) < 0) - TEST_ERROR + TEST_ERROR; return 0; @@ -469,77 +469,77 @@ create_reg_ref_dataset(hid_t file_id, hid_t loc_id) hid_t pid = (-1); if ((space_id = H5Screate_simple(rank, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((spacer_id = H5Screate_simple(rankr, dimsr, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((dsetv_id = H5Dcreate2(file_id, dsetnamev, H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dwrite(dsetv_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data) < 0) - TEST_ERROR + TEST_ERROR; if ((dsetr_id = H5Dcreate2(loc_id, dsetnamer, H5T_STD_REF_DSETREG, spacer_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; start[0] = 0; start[1] = 3; count[0] = 2; count[1] = 3; if (H5Sselect_hyperslab(space_id, H5S_SELECT_SET, start, NULL, count, NULL) < 0) - TEST_ERROR + TEST_ERROR; if (H5Rcreate(&ref[0], file_id, dsetnamev, H5R_DATASET_REGION, space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sselect_none(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sselect_elements(space_id, H5S_SELECT_SET, num_points, (const hsize_t *)coord) < 0) - TEST_ERROR + TEST_ERROR; if (H5Rcreate(&ref[1], file_id, dsetnamev, H5R_DATASET_REGION, space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dwrite(dsetr_id, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, ref) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dsetr_id) < 0) - TEST_ERROR + TEST_ERROR; /* create and set compact plist */ if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_layout(pid, H5D_COMPACT) < 0) - TEST_ERROR + TEST_ERROR; if ((dsetr_id = H5Dcreate2(loc_id, dsetnamer1, H5T_STD_REF_DSETREG, spacer_id, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dwrite(dsetr_id, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, ref) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dsetr_id) < 0) - TEST_ERROR + TEST_ERROR; /* create and set comp & chunk plist */ if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(pid, 1, &chunk_size) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_deflate(pid, 9) < 0) - TEST_ERROR + TEST_ERROR; if ((dsetr_id = H5Dcreate2(loc_id, dsetnamer2, H5T_STD_REF_DSETREG, spacer_id, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dwrite(dsetr_id, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, ref) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dsetr_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(space_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(spacer_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(dsetv_id) < 0) - TEST_ERROR + TEST_ERROR; return 0; @@ -792,97 +792,97 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_ /* Check the character sets are equal */ if (H5Aget_info(aid, &ainfo) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aget_info(aid2, &ainfo2) < 0) - TEST_ERROR + TEST_ERROR; if (ainfo.cset != ainfo2.cset) - TEST_ERROR + TEST_ERROR; /* Check the creation orders are equal (if appropriate) */ if (ainfo.corder_valid != ainfo2.corder_valid) - TEST_ERROR + TEST_ERROR; if (ainfo.corder_valid) if (ainfo.corder != ainfo2.corder) - TEST_ERROR + TEST_ERROR; /* Check the datatypes are equal */ /* Open the datatype for the source attribute */ if ((tid = H5Aget_type(aid)) < 0) - TEST_ERROR + TEST_ERROR; /* Open the datatype for the destination attribute */ if ((tid2 = H5Aget_type(aid2)) < 0) - TEST_ERROR + TEST_ERROR; /* Check that both datatypes are committed/not committed */ if ((is_committed = H5Tcommitted(tid)) < 0) - TEST_ERROR + TEST_ERROR; if ((is_committed2 = H5Tcommitted(tid2)) < 0) - TEST_ERROR + TEST_ERROR; if (is_committed != is_committed2) - TEST_ERROR + TEST_ERROR; /* Compare the datatypes */ if (H5Tequal(tid, tid2) != TRUE) - TEST_ERROR + TEST_ERROR; /* Determine the size of datatype (for later) */ if ((elmt_size = H5Tget_size(tid)) == 0) - TEST_ERROR + TEST_ERROR; /* Check the dataspaces are equal */ /* Open the dataspace for the source attribute */ if ((sid = H5Aget_space(aid)) < 0) - TEST_ERROR + TEST_ERROR; /* Open the dataspace for the destination attribute */ if ((sid2 = H5Aget_space(aid2)) < 0) - TEST_ERROR + TEST_ERROR; /* Compare the dataspaces */ if (H5Sextent_equal(sid, sid2) != TRUE) - TEST_ERROR + TEST_ERROR; /* Determine the number of elements in dataspace (for later) */ if ((nelmts = H5Sget_simple_extent_npoints(sid2)) < 0) - TEST_ERROR + TEST_ERROR; /* Check the raw data is equal */ /* Allocate & initialize space for the raw data buffers */ if ((rbuf = HDcalloc(elmt_size, (size_t)nelmts)) == NULL) - TEST_ERROR + TEST_ERROR; if ((rbuf2 = HDcalloc(elmt_size, (size_t)nelmts)) == NULL) - TEST_ERROR + TEST_ERROR; /* Read data from the source attribute */ if (H5Aread(aid, tid, rbuf) < 0) - TEST_ERROR + TEST_ERROR; /* Read data from the destination attribute */ if (H5Aread(aid2, tid2, rbuf2) < 0) - TEST_ERROR + TEST_ERROR; /* Check raw data read in against data written out */ if (wbuf) { if (!compare_data(aid, (hid_t)0, pid, tid, (size_t)nelmts, wbuf, rbuf, obj_owner)) - TEST_ERROR + TEST_ERROR; if (!compare_data(aid2, (hid_t)0, pid, tid2, (size_t)nelmts, wbuf, rbuf2, obj_owner)) - TEST_ERROR + TEST_ERROR; } /* end if */ /* Don't have written data, just compare data between the two attributes */ else if (!compare_data(aid, aid2, pid, tid, (size_t)nelmts, rbuf, rbuf2, obj_owner)) - TEST_ERROR + TEST_ERROR; /* Reclaim vlen data, if necessary */ if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) if (H5Treclaim(tid, sid, H5P_DEFAULT, rbuf) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tdetect_class(tid2, H5T_VLEN) == TRUE) if (H5Treclaim(tid2, sid2, H5P_DEFAULT, rbuf2) < 0) - TEST_ERROR + TEST_ERROR; /* Release raw data buffers */ HDfree(rbuf); @@ -892,19 +892,19 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_ /* close the source dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* close the destination dataspace */ if (H5Sclose(sid2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the destination datatype */ if (H5Tclose(tid2) < 0) - TEST_ERROR + TEST_ERROR; return TRUE; @@ -949,23 +949,23 @@ compare_std_attributes(hid_t oid, hid_t oid2, hid_t pid) /* Retrieve the object copy flags from the property list, if it's non-DEFAULT */ if (pid != H5P_DEFAULT) { if (H5Pget_copy_object(pid, &cpy_flags) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ else cpy_flags = 0; /* Check the number of attributes on source dataset */ if (H5Oget_info3(oid, &oinfo1, H5O_INFO_NUM_ATTRS) < 0) - TEST_ERROR + TEST_ERROR; /* Check the number of attributes on destination dataset */ if (H5Oget_info3(oid2, &oinfo2, H5O_INFO_NUM_ATTRS) < 0) - TEST_ERROR + TEST_ERROR; if (cpy_flags & H5O_COPY_WITHOUT_ATTR_FLAG) { /* Check that the destination has no attributes */ if (oinfo2.num_attrs != 0) - TEST_ERROR + TEST_ERROR; } /* end if */ else { char attr_name[ATTR_NAME_LEN]; /* Attribute name */ @@ -973,28 +973,28 @@ compare_std_attributes(hid_t oid, hid_t oid2, hid_t pid) /* Compare the number of attributes */ if (oinfo1.num_attrs != oinfo2.num_attrs) - TEST_ERROR + TEST_ERROR; /* Check the attributes are equal */ for (i = 0; i < (unsigned)oinfo1.num_attrs; i++) { if ((aid = H5Aopen_by_idx(oid, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)i, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aget_name(aid, (size_t)ATTR_NAME_LEN, attr_name) < 0) - TEST_ERROR + TEST_ERROR; if ((aid2 = H5Aopen(oid2, attr_name, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check the attributes are equal */ if (!compare_attribute(aid, aid2, pid, NULL, oid)) - TEST_ERROR + TEST_ERROR; /* Close the attributes */ if (H5Aclose(aid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(aid2) < 0) - TEST_ERROR + TEST_ERROR; } /* end for */ } /* end if */ @@ -1031,7 +1031,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, /* Check size of each element */ if ((elmt_size = H5Tget_size(tid)) == 0) - TEST_ERROR + TEST_ERROR; /* If the type is a compound containing a vlen, loop over all elements for * each compound member. Compounds containing reference are not supported @@ -1048,7 +1048,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, /* Get number of members in compound */ if ((nmembs = H5Tget_nmembers(tid)) < 0) - TEST_ERROR + TEST_ERROR; /* Loop over members */ for (memb_idx = 0; memb_idx < (unsigned)nmembs; memb_idx++) { @@ -1058,11 +1058,11 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, /* Get member id */ if ((memb_id = H5Tget_member_type(tid, memb_idx)) < 0) - TEST_ERROR + TEST_ERROR; /* Get member size */ if ((memb_size = H5Tget_size(memb_id)) == 0) - TEST_ERROR + TEST_ERROR; /* Set up pointers to member in the first element */ memb1 = (const uint8_t *)buf1 + memb_off; @@ -1074,7 +1074,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, /* Get base type of vlen datatype */ if ((base_id = H5Tget_super(memb_id)) < 0) - TEST_ERROR + TEST_ERROR; /* Iterate over all elements, recursively calling this function * for each */ @@ -1082,14 +1082,14 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, /* Check vlen lengths */ if (((const hvl_t *)((const void *)memb1))->len != ((const hvl_t *)((const void *)memb2))->len) - TEST_ERROR + TEST_ERROR; /* Check vlen data */ if (!compare_data(parent1, parent2, pid, base_id, ((const hvl_t *)((const void *)memb1))->len, ((const hvl_t *)((const void *)memb1))->p, ((const hvl_t *)((const void *)memb2))->p, obj_owner)) - TEST_ERROR + TEST_ERROR; /* Update member pointers */ memb1 += elmt_size; @@ -1104,7 +1104,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, /* Iterate over all elements, calling memcmp() for each */ for (elmt = 0; elmt < nelmts; elmt++) { if (HDmemcmp(memb1, memb2, memb_size) != 0) - TEST_ERROR + TEST_ERROR; /* Update member pointers */ memb1 += elmt_size; @@ -1120,11 +1120,11 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, /* Check for "simple" vlen datatype */ if (H5Tget_class(tid) != H5T_VLEN) - TEST_ERROR + TEST_ERROR; /* Get base type of vlen datatype */ if ((base_tid = H5Tget_super(tid)) < 0) - TEST_ERROR + TEST_ERROR; /* Loop over elements in buffers */ vl_buf1 = (const hvl_t *)buf1; @@ -1132,23 +1132,23 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, for (u = 0; u < nelmts; u++, vl_buf1++, vl_buf2++) { /* Check vlen lengths */ if (vl_buf1->len != vl_buf2->len) - TEST_ERROR + TEST_ERROR; /* Check vlen data */ if (!compare_data(parent1, parent2, pid, base_tid, vl_buf1->len, vl_buf1->p, vl_buf2->p, obj_owner)) - TEST_ERROR + TEST_ERROR; } /* end for */ if (H5Tclose(base_tid) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ else if (H5Tdetect_class(tid, H5T_REFERENCE) == TRUE) { size_t u; /* Local index variable */ /* Check for "simple" reference datatype */ if (H5Tget_class(tid) != H5T_REFERENCE) - TEST_ERROR + TEST_ERROR; /* Check for object or region reference */ if (H5Tequal(tid, H5T_STD_REF_OBJ) > 0) { @@ -1163,17 +1163,17 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, /* Check for types of objects handled */ if (H5Rget_obj_type2(parent1, H5R_OBJECT, ref_buf1, &obj1_type) < 0) - TEST_ERROR + TEST_ERROR; if (H5Rget_obj_type2(parent2, H5R_OBJECT, ref_buf2, &obj2_type) < 0) - TEST_ERROR + TEST_ERROR; if (obj1_type != obj2_type) - TEST_ERROR + TEST_ERROR; /* Open referenced objects */ if ((obj1_id = H5Rdereference2(parent1, H5P_DEFAULT, H5R_OBJECT, ref_buf1)) < 0) - TEST_ERROR + TEST_ERROR; if ((obj2_id = H5Rdereference2(parent2, H5P_DEFAULT, H5R_OBJECT, ref_buf2)) < 0) - TEST_ERROR + TEST_ERROR; /* break the infinite loop when the ref_object points to itself */ if (obj_owner > 0) { @@ -1181,16 +1181,16 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, int token_cmp; if (H5Oget_info3(obj_owner, &oinfo1, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(obj1_id, &oinfo2, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(obj1_id, &oinfo1.token, &oinfo2.token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (!token_cmp) { if (H5Oclose(obj1_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oclose(obj2_id) < 0) - TEST_ERROR + TEST_ERROR; return TRUE; } } @@ -1199,17 +1199,17 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, switch (obj1_type) { case H5O_TYPE_DATASET: if (compare_datasets(obj1_id, obj2_id, pid, NULL) != TRUE) - TEST_ERROR + TEST_ERROR; break; case H5O_TYPE_GROUP: if (compare_groups(obj1_id, obj2_id, pid, -1, 0) != TRUE) - TEST_ERROR + TEST_ERROR; break; case H5O_TYPE_NAMED_DATATYPE: if (H5Tequal(obj1_id, obj2_id) != TRUE) - TEST_ERROR + TEST_ERROR; break; case H5O_TYPE_MAP: @@ -1218,14 +1218,14 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, case H5O_TYPE_UNKNOWN: case H5O_TYPE_NTYPES: default: - TEST_ERROR + TEST_ERROR; } /* end switch */ /* Close objects */ if (H5Oclose(obj1_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oclose(obj2_id) < 0) - TEST_ERROR + TEST_ERROR; } /* end for */ } /* end if */ else if (H5Tequal(tid, H5T_STD_REF_DSETREG) > 0) { @@ -1241,17 +1241,17 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, /* Check for types of objects handled */ if (H5Rget_obj_type2(parent1, H5R_DATASET_REGION, ref_buf1, &obj1_type) < 0) - TEST_ERROR + TEST_ERROR; if (H5Rget_obj_type2(parent2, H5R_DATASET_REGION, ref_buf2, &obj2_type) < 0) - TEST_ERROR + TEST_ERROR; if (obj1_type != obj2_type) - TEST_ERROR + TEST_ERROR; /* Open referenced objects */ if ((obj1_id = H5Rdereference2(parent1, H5P_DEFAULT, H5R_DATASET_REGION, ref_buf1)) < 0) - TEST_ERROR + TEST_ERROR; if ((obj2_id = H5Rdereference2(parent2, H5P_DEFAULT, H5R_DATASET_REGION, ref_buf2)) < 0) - TEST_ERROR + TEST_ERROR; /* break the infinite loop when the ref_object points to itself */ if (obj_owner > 0) { @@ -1259,16 +1259,16 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, int token_cmp; if (H5Oget_info3(obj_owner, &oinfo1, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(obj1_id, &oinfo2, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(obj1_id, &oinfo1.token, &oinfo2.token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (!token_cmp) { if (H5Oclose(obj1_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oclose(obj2_id) < 0) - TEST_ERROR + TEST_ERROR; return TRUE; } } @@ -1277,17 +1277,17 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, switch (obj1_type) { case H5O_TYPE_DATASET: if (compare_datasets(obj1_id, obj2_id, pid, NULL) != TRUE) - TEST_ERROR + TEST_ERROR; break; case H5O_TYPE_GROUP: if (compare_groups(obj1_id, obj2_id, pid, -1, 0) != TRUE) - TEST_ERROR + TEST_ERROR; break; case H5O_TYPE_NAMED_DATATYPE: if (H5Tequal(obj1_id, obj2_id) != TRUE) - TEST_ERROR + TEST_ERROR; break; case H5O_TYPE_MAP: @@ -1296,37 +1296,37 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, case H5O_TYPE_UNKNOWN: case H5O_TYPE_NTYPES: default: - TEST_ERROR + TEST_ERROR; } /* end switch */ /* Close objects */ if (H5Oclose(obj1_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oclose(obj2_id) < 0) - TEST_ERROR + TEST_ERROR; /* Get regions for referenced datasets */ if ((obj1_sid = H5Rget_region(parent1, H5R_DATASET_REGION, ref_buf1)) < 0) - TEST_ERROR + TEST_ERROR; if ((obj2_sid = H5Rget_region(parent2, H5R_DATASET_REGION, ref_buf2)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if dataspaces are the same shape */ if (H5Sselect_shape_same(obj1_sid, obj2_sid) < 0) - TEST_ERROR + TEST_ERROR; /* Close dataspaces */ if (H5Sclose(obj1_sid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(obj2_sid) < 0) - TEST_ERROR + TEST_ERROR; } /* end for */ } /* end if */ else - TEST_ERROR + TEST_ERROR; } /* end else */ else if (HDmemcmp(buf1, buf2, (elmt_size * nelmts)) != 0) - TEST_ERROR + TEST_ERROR; /* Data should be the same. :-) */ return TRUE; @@ -1367,81 +1367,81 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf) /* Open the datatype for the source dataset */ if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; /* Open the datatype for the destination dataset */ if ((tid2 = H5Dget_type(did2)) < 0) - TEST_ERROR + TEST_ERROR; /* Check that both datatypes are committed/not committed */ if ((is_committed = H5Tcommitted(tid)) < 0) - TEST_ERROR + TEST_ERROR; if ((is_committed2 = H5Tcommitted(tid2)) < 0) - TEST_ERROR + TEST_ERROR; if (is_committed != is_committed2) - TEST_ERROR + TEST_ERROR; /* Compare the datatypes */ if (H5Tequal(tid, tid2) != TRUE) - TEST_ERROR + TEST_ERROR; /* Determine the size of datatype (for later) */ if ((elmt_size = H5Tget_size(tid)) == 0) - TEST_ERROR + TEST_ERROR; /* Check the dataspaces are equal */ /* Open the dataspace for the source dataset */ if ((sid = H5Dget_space(did)) < 0) - TEST_ERROR + TEST_ERROR; /* Open the dataspace for the destination dataset */ if ((sid2 = H5Dget_space(did2)) < 0) - TEST_ERROR + TEST_ERROR; /* Compare the dataspaces */ if (H5Sextent_equal(sid, sid2) != TRUE) - TEST_ERROR + TEST_ERROR; /* Determine the number of elements in dataspace (for later) */ if ((nelmts = H5Sget_simple_extent_npoints(sid)) < 0) - TEST_ERROR + TEST_ERROR; /* Check the dataset creation property lists are equal */ /* Open the dataset creation property list for the source dataset */ if ((dcpl = H5Dget_create_plist(did)) < 0) - TEST_ERROR + TEST_ERROR; /* Open the dataset creation property list for the destination dataset */ if ((dcpl2 = H5Dget_create_plist(did2)) < 0) - TEST_ERROR + TEST_ERROR; /* Compare the rest of the dataset creation property lists */ if (H5Pequal(dcpl, dcpl2) != TRUE) - TEST_ERROR + TEST_ERROR; /* Get the number of filters on dataset (for later) */ if ((nfilters = H5Pget_nfilters(dcpl)) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset creation property list */ if (H5Pclose(dcpl) < 0) - TEST_ERROR + TEST_ERROR; /* close the destination dataset creation property list */ if (H5Pclose(dcpl2) < 0) - TEST_ERROR + TEST_ERROR; /* Check the allocated storage is the same */ /* Check that the space allocation status is the same */ if (H5Dget_space_status(did, &space_status) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dget_space_status(did2, &space_status2) < 0) - TEST_ERROR + TEST_ERROR; if (space_status != space_status2) - TEST_ERROR + TEST_ERROR; /* Check that the space used is the same */ /* (Don't check if the dataset is filtered (i.e. compressed, etc.) and @@ -1455,41 +1455,41 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf) hsize_t storage_size2 = H5Dget_storage_size(did2); /* 2nd Dataset's raw data storage size */ if (storage_size != storage_size2) - TEST_ERROR + TEST_ERROR; } /* end if */ /* Check the raw data is equal */ /* Allocate & initialize space for the raw data buffers */ if ((rbuf = HDcalloc(elmt_size, (size_t)nelmts)) == NULL) - TEST_ERROR + TEST_ERROR; if ((rbuf2 = HDcalloc(elmt_size, (size_t)nelmts)) == NULL) - TEST_ERROR + TEST_ERROR; /* Read data from datasets */ if (H5Dread(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dread(did2, tid2, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf2) < 0) - TEST_ERROR + TEST_ERROR; /* Check raw data read in against data written out */ if (wbuf) { if (!compare_data(did, (hid_t)0, pid, tid, (size_t)nelmts, wbuf, rbuf, did)) - TEST_ERROR + TEST_ERROR; if (!compare_data(did2, (hid_t)0, pid, tid2, (size_t)nelmts, wbuf, rbuf2, did2)) - TEST_ERROR + TEST_ERROR; } /* end if */ /* Don't have written data, just compare data between the two datasets */ else if (!compare_data(did, did2, pid, tid, (size_t)nelmts, rbuf, rbuf2, did)) - TEST_ERROR + TEST_ERROR; /* Reclaim vlen data, if necessary */ if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) if (H5Treclaim(tid, sid, H5P_DEFAULT, rbuf) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tdetect_class(tid2, H5T_VLEN) == TRUE) if (H5Treclaim(tid2, sid2, H5P_DEFAULT, rbuf2) < 0) - TEST_ERROR + TEST_ERROR; /* Release raw data buffers */ HDfree(rbuf); @@ -1499,23 +1499,23 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf) /* close the source dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* close the destination dataspace */ if (H5Sclose(sid2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the destination datatype */ if (H5Tclose(tid2) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the attributes are equal */ if (compare_std_attributes(did, did2, pid) != TRUE) - TEST_ERROR + TEST_ERROR; /* Datasets should be the same. :-) */ return TRUE; @@ -1561,23 +1561,23 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags) /* Retrieve the object copy flags from the property list, if it's non-DEFAULT */ if (pid != H5P_DEFAULT) { if (H5Pget_copy_object(pid, &cpy_flags) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ else cpy_flags = 0; /* Check if both groups have the same # of objects */ if (H5Gget_info(gid, &ginfo) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gget_info(gid2, &ginfo2) < 0) - TEST_ERROR + TEST_ERROR; if ((cpy_flags & H5O_COPY_SHALLOW_HIERARCHY_FLAG) && depth == 0) { if (ginfo2.nlinks != 0) - TEST_ERROR + TEST_ERROR; } /* end if */ else { if (ginfo.nlinks != ginfo2.nlinks) - TEST_ERROR + TEST_ERROR; } /* end if */ /* Check contents of groups */ @@ -1592,20 +1592,20 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags) /* Check name of objects */ if (H5Lget_name_by_idx(gid, ".", H5_INDEX_NAME, H5_ITER_INC, idx, objname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lget_name_by_idx(gid2, ".", H5_INDEX_NAME, H5_ITER_INC, idx, objname2, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (HDstrcmp(objname, objname2) != 0) - TEST_ERROR + TEST_ERROR; /* Get link info */ if (H5Lget_info2(gid, objname, &linfo, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lget_info2(gid2, objname2, &linfo2, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (linfo.type != linfo2.type) - TEST_ERROR + TEST_ERROR; /* Extra checks for "real" objects */ if (linfo.type == H5L_TYPE_HARD) { @@ -1616,20 +1616,20 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags) /* Compare some pieces of the object info */ /* Get data model object info */ if (H5Oget_info_by_name3(gid, objname, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info_by_name3(gid2, objname2, &oinfo2, H5O_INFO_BASIC, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* Get native object info */ if (H5Oget_native_info_by_name(gid, objname, &ninfo, H5O_NATIVE_INFO_HDR, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_native_info_by_name(gid2, objname2, &ninfo2, H5O_NATIVE_INFO_HDR, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (oinfo.type != oinfo2.type) - TEST_ERROR + TEST_ERROR; if (oinfo.rc != oinfo2.rc) - TEST_ERROR + TEST_ERROR; /* If NULL messages are preserved, the number of messages * should be the same in the destination. @@ -1640,7 +1640,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags) if (ninfo.hdr.nmesgs != ninfo2.hdr.nmesgs) ; else if (ninfo.hdr.nmesgs < ninfo2.hdr.nmesgs) - TEST_ERROR + TEST_ERROR; } /* Check for object already having been compared */ @@ -1651,28 +1651,28 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags) /* Open objects */ if ((oid = H5Oopen(gid, objname, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; if ((oid2 = H5Oopen(gid2, objname2, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Compare objects within group */ switch (oinfo.type) { case H5O_TYPE_GROUP: /* Compare groups */ if (compare_groups(oid, oid2, pid, depth - 1, copy_flags) != TRUE) - TEST_ERROR + TEST_ERROR; break; case H5O_TYPE_DATASET: /* Compare datasets */ if (compare_datasets(oid, oid2, pid, NULL) != TRUE) - TEST_ERROR + TEST_ERROR; break; case H5O_TYPE_NAMED_DATATYPE: /* Compare datatypes */ if (H5Tequal(oid, oid2) != TRUE) - TEST_ERROR + TEST_ERROR; break; case H5O_TYPE_MAP: @@ -1687,14 +1687,14 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags) /* Close objects */ if (H5Oclose(oid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oclose(oid2) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ else { /* Check that both links are the same size */ if (linfo.u.val_size != linfo2.u.val_size) - TEST_ERROR + TEST_ERROR; /* Compare link values */ if (linfo.type == H5L_TYPE_SOFT || @@ -1705,13 +1705,13 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags) /* Get link values */ HDassert(linfo.u.val_size <= NAME_BUF_SIZE); if (H5Lget_val(gid, objname, linkval, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lget_val(gid2, objname2, linkval2, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* Compare link data */ if (HDmemcmp(linkval, linkval2, linfo.u.val_size) != 0) - TEST_ERROR + TEST_ERROR; } /* end else-if */ else { HDassert(0 && "Unknown type of link"); @@ -1722,7 +1722,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags) /* Check if the attributes are equal */ if (compare_std_attributes(gid, gid2, pid) != TRUE) - TEST_ERROR + TEST_ERROR; /* Groups should be the same. :-) */ return TRUE; @@ -1757,19 +1757,19 @@ compare_idx_type(hid_t fapl, hid_t did, H5D_chunk_index_t new_type, H5D_chunk_in /* Get the chunk index type */ if (H5D__layout_idx_type_test(did, &idx_type) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Check if we are using the latest version of the format */ if (H5Pget_libver_bounds(fapl, &low, NULL) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Verify index type */ if (low == H5F_LIBVER_LATEST) { if (idx_type != new_type) - TEST_ERROR + TEST_ERROR; } else if (idx_type != old_type) - TEST_ERROR + TEST_ERROR; return TRUE; error: @@ -1808,68 +1808,68 @@ test_copy_named_datatype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create datatype */ if ((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; /* create named datatype */ if ((H5Tcommit2(fid_src, NAME_DATATYPE_SIMPLE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the datatype from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATATYPE_SIMPLE, fid_dst, NAME_DATATYPE_SIMPLE, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the datatype for copy */ if ((tid = H5Topen2(fid_src, NAME_DATATYPE_SIMPLE, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* open the copied datatype */ if ((tid2 = H5Topen2(fid_dst, NAME_DATATYPE_SIMPLE, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Compare the datatypes */ if (H5Tequal(tid, tid2) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination datatype */ if (H5Tclose(tid2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -1918,68 +1918,68 @@ test_copy_named_datatype_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_ /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create datatype */ if ((tid = H5Tvlen_create(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; /* create named datatype */ if ((H5Tcommit2(fid_src, NAME_DATATYPE_VL, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the datatype from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATATYPE_VL, fid_dst, NAME_DATATYPE_VL, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the datatype for copy */ if ((tid = H5Topen2(fid_src, NAME_DATATYPE_VL, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* open the copied datatype */ if ((tid2 = H5Topen2(fid_dst, NAME_DATATYPE_VL, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Compare the datatypes */ if (H5Tequal(tid, tid2) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination datatype */ if (H5Tclose(tid2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -2028,76 +2028,76 @@ test_copy_named_datatype_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create first vlen datatype */ if ((tid = H5Tvlen_create(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; /* create second (nested) vlen datatype */ if ((tid2 = H5Tvlen_create(tid)) < 0) - TEST_ERROR + TEST_ERROR; /* create named datatype */ if ((H5Tcommit2(fid_src, NAME_DATATYPE_VL_VL, tid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close the first datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the second datatype */ if (H5Tclose(tid2) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the datatype from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATATYPE_VL_VL, fid_dst, NAME_DATATYPE_VL_VL, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the datatype for copy */ if ((tid = H5Topen2(fid_src, NAME_DATATYPE_VL_VL, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* open the copied datatype */ if ((tid2 = H5Topen2(fid_dst, NAME_DATATYPE_VL_VL, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Compare the datatypes */ if (H5Tequal(tid, tid2) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination datatype */ if (H5Tclose(tid2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -2154,100 +2154,100 @@ test_copy_named_datatype_attr_self(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create datatype */ if ((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; /* create named datatype */ if ((H5Tcommit2(fid_src, NAME_DATATYPE_SIMPLE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create dataspace */ if ((sid = H5Screate_simple(2, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create attribute */ if ((aid = H5Acreate2(tid, "attr_self", tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* attach other attributes to the dataset */ if (test_copy_attach_attributes(tid, tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the attribute */ if (H5Aclose(aid) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the datatype from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATATYPE_SIMPLE, fid_dst, NAME_DATATYPE_SIMPLE, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the source datatype */ if ((tid = H5Topen2(fid_src, NAME_DATATYPE_SIMPLE, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* open the copied datatype */ if ((tid2 = H5Topen2(fid_dst, NAME_DATATYPE_SIMPLE, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Compare the datatypes */ if (H5Tequal(tid, tid2) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the source datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination attribute */ if ((aid = H5Aopen(tid2, "attr_self", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination attribute's datatype */ if ((tid = H5Aget_type(aid)) < 0) - TEST_ERROR + TEST_ERROR; /* verify that the attribute's datatype is committed */ if (H5Tcommitted(tid) != TRUE) - TEST_ERROR + TEST_ERROR; /* verify that the tokens of the datatypes are the same */ if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid2, &oinfo2, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; same_type = TRUE; if (oinfo.fileno == oinfo2.fileno) { int token_cmp; if (H5Otoken_cmp(tid2, &oinfo.token, &oinfo2.token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) same_type = FALSE; } @@ -2255,30 +2255,30 @@ test_copy_named_datatype_attr_self(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap same_type = FALSE; if (!same_type) - FAIL_PUTS_ERROR("destination attribute does not use the same committed datatype") + FAIL_PUTS_ERROR("destination attribute does not use the same committed datatype"); /* Verify that there are only 2 links int he destination root group */ if (H5Gget_info(fid_dst, &ginfo) < 0) if (ginfo.nlinks != 2) - FAIL_PUTS_ERROR("unexpected number of links in destination root group") + FAIL_PUTS_ERROR("unexpected number of links in destination root group"); /* close the attribute */ if (H5Aclose(aid) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatypes */ if (H5Tclose(tid2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -2338,7 +2338,7 @@ test_copy_dataset_simple(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim2d[0] = DIM_SIZE_1; @@ -2346,77 +2346,77 @@ test_copy_dataset_simple(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d /* create 2D dataspace */ if ((sid = H5Screate_simple(2, dim2d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create 2D int dataset at SRC file */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_SIMPLE, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the dataset */ if (test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the dataset from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -2478,7 +2478,7 @@ test_copy_dataset_versionbounds(hid_t fcpl_src, hid_t fapl_src) /* Create a file access property list for destination file */ if ((fapl_dst = h5_fileaccess()) < 0) - TEST_ERROR + TEST_ERROR; /* Initialize the filenames */ h5_fixname(FILENAME[4], fapl_src, src_fname, sizeof src_fname); @@ -2490,7 +2490,7 @@ test_copy_dataset_versionbounds(hid_t fcpl_src, hid_t fapl_src) /* Create source file */ fid_src = H5Fcreate(src_fname, H5F_ACC_TRUNC, fcpl_src, fapl_src); if (fid_src < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim2d[0] = DIM_SIZE_1; @@ -2498,41 +2498,41 @@ test_copy_dataset_versionbounds(hid_t fcpl_src, hid_t fapl_src) /* Create 2D dataspace */ if ((sid = H5Screate_simple(2, dim2d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* Create 2D int dataset in SRC file */ did_src = H5Dcreate2(fid_src, NAME_DATASET_SIMPLE, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (did_src < 0) - TEST_ERROR + TEST_ERROR; /* Write data into SRC file */ ret = H5Dwrite(did_src, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf); if (ret < 0) - TEST_ERROR + TEST_ERROR; /* Get the internal dset ptr to get the fill version for verifying later */ if ((dsetp = (H5D_t *)H5VL_object(did_src)) == NULL) - TEST_ERROR + TEST_ERROR; srcdset_layoutversion = dsetp->shared->layout.version; /* Close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* Close the dataset */ if (H5Dclose(did_src) < 0) - TEST_ERROR + TEST_ERROR; /* Close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* Open the source file with read-only */ fid_src = H5Fopen(src_fname, H5F_ACC_RDONLY, fapl_src); if (fid_src < 0) - TEST_ERROR + TEST_ERROR; /* Loop through all the combinations of low/high library format bounds, skipping invalid combinations. Create a destination file and copy the @@ -2553,12 +2553,12 @@ test_copy_dataset_versionbounds(hid_t fcpl_src, hid_t fapl_src) /* Create destination file */ fid_dst = H5Fcreate(dst_fname, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_dst); if (fid_dst < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Try to copy the dataset */ H5E_BEGIN_TRY @@ -2573,53 +2573,53 @@ test_copy_dataset_versionbounds(hid_t fcpl_src, hid_t fapl_src) /* Failure is valid if layout version of source dataset is greater than destination */ if (srcdset_layoutversion <= H5O_layout_ver_bounds[high]) - TEST_ERROR + TEST_ERROR; /* Close the DST file before continue */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; continue; } /* Close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* Open destination file */ fid_dst = H5Fopen(dst_fname, H5F_ACC_RDWR, fapl_dst); if (fid_dst < 0) - TEST_ERROR + TEST_ERROR; /* Open the datasets to compare */ did_src = H5Dopen2(fid_src, NAME_DATASET_SIMPLE, H5P_DEFAULT); if (did_src < 0) - TEST_ERROR + TEST_ERROR; did_dst = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT); if (did_dst < 0) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did_src, did_dst, H5P_DEFAULT, buf) != TRUE) - TEST_ERROR + TEST_ERROR; /* Close the datasets */ if (H5Dclose(did_dst) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did_src) < 0) - TEST_ERROR + TEST_ERROR; /* Close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; } /* for high */ } /* for low */ /* Close property list and source file */ if (H5Pclose(fapl_dst) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -2678,7 +2678,7 @@ test_copy_dataset_simple_samefile(hid_t fcpl, hid_t fapl) /* create source file */ if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim2d[0] = DIM_SIZE_1; @@ -2686,64 +2686,64 @@ test_copy_dataset_simple_samefile(hid_t fcpl, hid_t fapl) /* create 2D dataspace */ if ((sid = H5Screate_simple(2, dim2d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create 2D int dataset at SRC file */ if ((did = H5Dcreate2(fid, NAME_DATASET_SIMPLE, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the dataset */ if (test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-write */ if ((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the dataset from SRC to DST */ if (H5Ocopy(fid, NAME_DATASET_SIMPLE, fid, NAME_DATASET_SIMPLE2, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset for copy */ if ((did = H5Dopen2(fid, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination dataset */ if ((did2 = H5Dopen2(fid, NAME_DATASET_SIMPLE2, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -2804,7 +2804,7 @@ test_copy_dataset_simple_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim2d[0] = DIM_SIZE_1; @@ -2812,78 +2812,78 @@ test_copy_dataset_simple_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h /* create 2D dataspace */ if ((sid = H5Screate_simple(2, dim2d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create 2D int dataset at SRC file */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_SIMPLE, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the dataset */ if (test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; if (!test_open) { /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the dataset from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (!test_open) { /* open the dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; } /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -2948,96 +2948,96 @@ test_copy_dataset_compound(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim1d[0] = DIM_SIZE_1; /* create dataspace */ if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create datatype */ if ((tid = H5Tcreate(H5T_COMPOUND, sizeof(comp_t))) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tinsert(tid, "int_name", HOFFSET(comp_t, a), H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tinsert(tid, "double_name", HOFFSET(comp_t, d), H5T_NATIVE_DOUBLE) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_COMPOUND, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* close datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the dataset */ if (test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the dataset from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATASET_COMPOUND, fid_dst, NAME_DATASET_COMPOUND, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_COMPOUND, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_COMPOUND, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -3105,7 +3105,7 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set 1-D dataspace dimensions */ dim1d[0] = DIM_SIZE_1; @@ -3113,38 +3113,38 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t /* create 1-D dataspace */ if ((sid = H5Screate_simple(1, dim1d, max_dim1d)) < 0) - TEST_ERROR + TEST_ERROR; /* create and set chunk plist */ if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(pid, 1, chunk_dim1d) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_CHUNKED, H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close chunk plist */ if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf1d) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the dataset */ if (test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* * Create 1-D dataset: chunked, non-filterd, with data @@ -3153,38 +3153,38 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t */ /* create 1-D dataspace */ if ((sid = H5Screate_simple(1, dim1d, dim1d)) < 0) - TEST_ERROR + TEST_ERROR; /* create and set chunk plist */ if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(pid, 1, dim1d) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_CHUNKED_SINGLE, H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close chunk plist */ if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf1d) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the dataset */ if (test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* Set 2-D dataspace dimensions */ dim2d[0] = DIM_SIZE_1; @@ -3192,59 +3192,59 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t /* create 2-D dataspace */ if ((sid = H5Screate_simple(2, dim2d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create and set chunk plist */ if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(pid, 2, chunk_dim2d) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_CHUNKED2, H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2d) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the dataset */ if (test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* Set allocation time to early */ if (H5Pset_alloc_time(pid, H5D_ALLOC_TIME_EARLY) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_CHUNKED3, H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close chunk plist */ if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2d) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the dataset */ if (test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* * Create 2-D dataset: chunked, non-filterd, with data, dims=chunk dims, @@ -3253,62 +3253,62 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t /* create 2-D dataspace */ if ((sid = H5Screate_simple(2, dim2d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create and set chunk plist to be the same as dims2d */ if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(pid, 2, dim2d) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_CHUNKED2_SINGLE, H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2d) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the dataset */ if (test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* * Create 2-D dataset: chunked, non-filterd, with data, dims=chunk dims, * H5D_ALLOC_TIME_EARLY */ if (H5Pset_alloc_time(pid, H5D_ALLOC_TIME_EARLY) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_CHUNKED3_SINGLE, H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2d) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the dataset */ if (test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* close chunk plist */ if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; /* * Create 2-D dataset: chunked, non-filterd, with data, dims=max dims=chunk dims, @@ -3316,254 +3316,254 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t */ /* create 2-D dataspace */ if ((sid = H5Screate_simple(2, dim2d, dim2d)) < 0) - TEST_ERROR + TEST_ERROR; /* create and set chunk plist to be the same as dims2d */ if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(pid, 2, dim2d) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_alloc_time(pid, H5D_ALLOC_TIME_LATE) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_CHUNKED4_SINGLE, H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2d) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the dataset */ if (test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* close chunk plist */ if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the datasets from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATASET_CHUNKED, fid_dst, NAME_DATASET_CHUNKED, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Ocopy(fid_src, NAME_DATASET_CHUNKED2, fid_dst, NAME_DATASET_CHUNKED2, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Ocopy(fid_src, NAME_DATASET_CHUNKED3, fid_dst, NAME_DATASET_CHUNKED3, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Ocopy(fid_src, NAME_DATASET_CHUNKED_SINGLE, fid_dst, NAME_DATASET_CHUNKED_SINGLE, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Ocopy(fid_src, NAME_DATASET_CHUNKED2_SINGLE, fid_dst, NAME_DATASET_CHUNKED2_SINGLE, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Ocopy(fid_src, NAME_DATASET_CHUNKED3_SINGLE, fid_dst, NAME_DATASET_CHUNKED3_SINGLE, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Ocopy(fid_src, NAME_DATASET_CHUNKED4_SINGLE, fid_dst, NAME_DATASET_CHUNKED4_SINGLE, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_CHUNKED, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the 1-D destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the array index type is correct */ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_EARRAY, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, buf1d) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_CHUNKED_SINGLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the 1-D destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED_SINGLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the array index type is correct */ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, buf1d) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* open the 2-D dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_CHUNKED2, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED2, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the array index type is correct */ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* open the 2-D dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_CHUNKED3, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED3, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the array index type is correct */ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* open the 2-D dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_CHUNKED2_SINGLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED2_SINGLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the array index type is correct */ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* open the 2-D dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_CHUNKED3_SINGLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED3_SINGLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the array index type is correct */ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* open the 2-D dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_CHUNKED4_SINGLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED4_SINGLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the array index type is correct */ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -3622,7 +3622,7 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set 1-D dataspace dimensions */ dim1d[0] = DIM_SIZE_1; @@ -3630,34 +3630,34 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* create 1-D dataspace */ if ((sid = H5Screate_simple(1, dim1d, max_dim1d)) < 0) - TEST_ERROR + TEST_ERROR; /* create and set chunk plist */ if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(pid, 1, chunk_dim1d) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_CHUNKED, H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close chunk plist */ if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the dataset */ if (test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* * create 1-D dataset: chunked, empty, non-filtered, @@ -3669,34 +3669,34 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* create 1-D dataspace */ if ((sid = H5Screate_simple(1, dim1d, dim1d)) < 0) - TEST_ERROR + TEST_ERROR; /* create and set chunk plist */ if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(pid, 1, dim1d) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_CHUNKED_SINGLE, H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close chunk plist */ if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the dataset */ if (test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* Set 2-D dataspace dimensions */ dim2d[0] = DIM_SIZE_1; @@ -3704,51 +3704,51 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* create 2-D dataspace */ if ((sid = H5Screate_simple(2, dim2d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create and set chunk plist */ if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(pid, 2, chunk_dim2d) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_CHUNKED2, H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the dataset */ if (test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* Set allocation time to early */ if (H5Pset_alloc_time(pid, H5D_ALLOC_TIME_EARLY) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_CHUNKED3, H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close chunk plist */ if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the dataset */ if (test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* * create 2-D dataset: chunked, empty, non-filtered, @@ -3761,26 +3761,26 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* create 2-D dataspace */ if ((sid = H5Screate_simple(2, dim2d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create and set chunk plist */ if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(pid, 2, dim2d) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_CHUNKED2_SINGLE, H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the dataset */ if (test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* * create 2-D dataset: chunked, empty, non-filtered, dims=chunk dims @@ -3788,28 +3788,28 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, */ /* Set allocation time to early */ if (H5Pset_alloc_time(pid, H5D_ALLOC_TIME_EARLY) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_CHUNKED3_SINGLE, H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close chunk plist */ if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the dataset */ if (test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* * create 2-D dataset: chunked, empty, non-filtered, @@ -3822,251 +3822,251 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* create 2-D dataspace */ if ((sid = H5Screate_simple(2, dim2d, dim2d)) < 0) - TEST_ERROR + TEST_ERROR; /* create and set chunk plist */ if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(pid, 2, dim2d) < 0) - TEST_ERROR + TEST_ERROR; /* Set allocation time to late */ if (H5Pset_alloc_time(pid, H5D_ALLOC_TIME_LATE) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_CHUNKED4_SINGLE, H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the dataset */ if (test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* close chunk plist */ if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the datasets from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATASET_CHUNKED, fid_dst, NAME_DATASET_CHUNKED, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Ocopy(fid_src, NAME_DATASET_CHUNKED_SINGLE, fid_dst, NAME_DATASET_CHUNKED_SINGLE, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Ocopy(fid_src, NAME_DATASET_CHUNKED2, fid_dst, NAME_DATASET_CHUNKED2, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Ocopy(fid_src, NAME_DATASET_CHUNKED2_SINGLE, fid_dst, NAME_DATASET_CHUNKED2_SINGLE, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Ocopy(fid_src, NAME_DATASET_CHUNKED3, fid_dst, NAME_DATASET_CHUNKED3, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Ocopy(fid_src, NAME_DATASET_CHUNKED3_SINGLE, fid_dst, NAME_DATASET_CHUNKED3_SINGLE, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Ocopy(fid_src, NAME_DATASET_CHUNKED4_SINGLE, fid_dst, NAME_DATASET_CHUNKED4_SINGLE, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset NAME_DATASET_CHUNKED in SRC file */ if ((did = H5Dopen2(fid_src, NAME_DATASET_CHUNKED, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the copied dataset NAME_DATASET_CHUNKED at destination */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the array index type is correct */ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_EARRAY, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset NAME_DATASET_CHUNKED_SINGLE in SRC file */ if ((did = H5Dopen2(fid_src, NAME_DATASET_CHUNKED_SINGLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the copied dataset NAME_DATASET_CHUNKED_SINGLE at destination */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED_SINGLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the array index type is correct */ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset NAME_DATASET_CHUNKED2 in SRC file */ if ((did = H5Dopen2(fid_src, NAME_DATASET_CHUNKED2, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the copied dataset NAME_DATASET_CHUNKED2 at destination */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED2, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the array index type is correct */ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset "NAME_DATASET_CHUNKED2_SINGLE in SRC file */ if ((did = H5Dopen2(fid_src, NAME_DATASET_CHUNKED2_SINGLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the copied dataset NAME_DATASET_CHUNKED2_SINGLE at destination */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED2_SINGLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the array index type is correct */ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset NAME_DATASET_CHUNKED3 in SRC file */ if ((did = H5Dopen2(fid_src, NAME_DATASET_CHUNKED3, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the copied dataset NAME_DATASET_CHUNKED3 at destinaion */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED3, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the array index type is correct */ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset NAME_DATASET_CHUNKED3_SINGLE in SRC file */ if ((did = H5Dopen2(fid_src, NAME_DATASET_CHUNKED3_SINGLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the copied dataset NAME_DATASET_CHUNKED3_SINGLE at destination */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED3_SINGLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the array index type is correct */ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset NAME_DATASET_CHUNKED4_SINGLE in SRC file */ if ((did = H5Dopen2(fid_src, NAME_DATASET_CHUNKED4_SINGLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the copied dataset NAME_DATASET_CHUNKED4_SINGLE at destination */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED4_SINGLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the array index type is correct */ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -4138,7 +4138,7 @@ test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set 1-D dataspace dimensions */ dim1d[0] = DIM_SIZE_1; @@ -4146,41 +4146,41 @@ test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* create 1-D dataspace */ if ((sid = H5Screate_simple(1, dim1d, max_dim1d)) < 0) - TEST_ERROR + TEST_ERROR; /* create and set chunk plist */ if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(pid, 1, chunk_dim1d) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_CHUNKED, H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf1d) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* Set extended dataset dimensions */ new_dim1d[0] = DIM_SIZE_1 * 2; /* Extend dataset's dimensions */ if (H5Dset_extent(did, new_dim1d) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the dataset */ if (test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* Change 1-D dataspace dimensions */ dim1d[0] = DIM_SIZE_1; @@ -4188,43 +4188,43 @@ test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* create 1-D dataspace */ if ((sid = H5Screate_simple(1, dim1d, max_dim1d)) < 0) - TEST_ERROR + TEST_ERROR; /* Set allocation time to early */ if (H5Pset_alloc_time(pid, H5D_ALLOC_TIME_EARLY) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_CHUNKED3, H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close chunk plist */ if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf1d) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* Set extended dataset dimensions */ new_dim1d[0] = DIM_SIZE_1 * 2; /* Extend dataset's dimensions */ if (H5Dset_extent(did, new_dim1d) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the dataset */ if (test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* Set 2-D dataspace dimensions */ dim2d[0] = DIM_SIZE_1; @@ -4234,26 +4234,26 @@ test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* create 2-D dataspace */ if ((sid = H5Screate_simple(2, dim2d, max_dim2d)) < 0) - TEST_ERROR + TEST_ERROR; /* create and set chunk plist */ if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(pid, 2, chunk_dim2d) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_CHUNKED2, H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2d) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* Set extended dataset dimensions */ new_dim2d[0] = DIM_SIZE_1 * 2; @@ -4261,15 +4261,15 @@ test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Extend dataset's dimensions */ if (H5Dset_extent(did, new_dim2d) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the dataset */ if (test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* Change 2-D dataspace dimensions */ dim2d[0] = DIM_SIZE_1; @@ -4279,28 +4279,28 @@ test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* create 2-D dataspace */ if ((sid = H5Screate_simple(2, dim2d, max_dim2d)) < 0) - TEST_ERROR + TEST_ERROR; /* Set allocation time to early */ if (H5Pset_alloc_time(pid, H5D_ALLOC_TIME_EARLY) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_CHUNKED4, H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close chunk plist */ if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2d) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* Set extended dataset dimensions */ new_dim2d[0] = DIM_SIZE_1 * 2; @@ -4308,146 +4308,146 @@ test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Extend dataset's dimensions */ if (H5Dset_extent(did, new_dim2d) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the dataset */ if (test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the datasets from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATASET_CHUNKED, fid_dst, NAME_DATASET_CHUNKED, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Ocopy(fid_src, NAME_DATASET_CHUNKED2, fid_dst, NAME_DATASET_CHUNKED2, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Ocopy(fid_src, NAME_DATASET_CHUNKED3, fid_dst, NAME_DATASET_CHUNKED3, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Ocopy(fid_src, NAME_DATASET_CHUNKED4, fid_dst, NAME_DATASET_CHUNKED4, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_CHUNKED, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the array index type is correct */ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_EARRAY, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_CHUNKED2, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED2, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the array index type is correct */ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_BT2, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_CHUNKED3, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED3, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the array index type is correct */ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_CHUNKED4, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED4, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the array index type is correct */ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -4519,7 +4519,7 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim2d[0] = DIM_SIZE_1; @@ -4527,61 +4527,61 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid /* create dataspace */ if ((sid = H5Screate_simple(2, dim2d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create and set comp & chunk plist */ if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(pid, 2, chunk_dim2d) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_deflate(pid, 9) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_CHUNKED, H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the dataset */ if (test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* Set allocation time to early */ if (H5Pset_alloc_time(pid, H5D_ALLOC_TIME_EARLY) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_CHUNKED2, H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close chunk plist */ if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the dataset */ if (test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* * create 2-D dataset: chunked, filtered, with data @@ -4589,32 +4589,32 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid */ /* create dataspace */ if ((sid = H5Screate_simple(2, dim2d, dim2d)) < 0) - TEST_ERROR + TEST_ERROR; /* create and set comp & chunk plist */ if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(pid, 2, dim2d) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_deflate(pid, 9) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_CHUNKED2_SINGLE, H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the dataset */ if (test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* * create 2-D dataset: chunked, filtered, with data @@ -4622,36 +4622,36 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid */ /* create dataspace */ if ((sid = H5Screate_simple(2, dim2d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* Set allocation time to early */ if (H5Pset_alloc_time(pid, H5D_ALLOC_TIME_EARLY) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_CHUNKED3_SINGLE, H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close chunk plist */ if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the dataset */ if (test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* * create 2-D dataset: chunked, filtered, with data @@ -4659,210 +4659,210 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid */ /* create dataspace */ if ((sid = H5Screate_simple(2, dim2d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create and set comp & chunk plist */ if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(pid, 2, dim2d) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_deflate(pid, 9) < 0) - TEST_ERROR + TEST_ERROR; /* Set allocation time to late */ if (H5Pset_alloc_time(pid, H5D_ALLOC_TIME_LATE) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_CHUNKED4_SINGLE, H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close chunk plist */ if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the dataset */ if (test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the dataset from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATASET_CHUNKED, fid_dst, NAME_DATASET_CHUNKED, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Ocopy(fid_src, NAME_DATASET_CHUNKED2, fid_dst, NAME_DATASET_CHUNKED2, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Ocopy(fid_src, NAME_DATASET_CHUNKED2_SINGLE, fid_dst, NAME_DATASET_CHUNKED2_SINGLE, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Ocopy(fid_src, NAME_DATASET_CHUNKED3_SINGLE, fid_dst, NAME_DATASET_CHUNKED3_SINGLE, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Ocopy(fid_src, NAME_DATASET_CHUNKED4_SINGLE, fid_dst, NAME_DATASET_CHUNKED4_SINGLE, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* Re-open the source and destination files for verification */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDONLY, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_CHUNKED, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_CHUNKED2, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED2, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset NAME_DATASET_CHUNKED2_SINGLE at source */ if ((did = H5Dopen2(fid_src, NAME_DATASET_CHUNKED2_SINGLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the copied dataset NAME_DATASET_CHUNKED2_SINGLE at destination */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED2_SINGLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset NAME_DATASET_CHUNKED3_SINGLE at source */ if ((did = H5Dopen2(fid_src, NAME_DATASET_CHUNKED3_SINGLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the copied dataset NAME_DATASET_CHUNKED3_SINGLE at destination */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED3_SINGLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset NAME_DATASET_CHUNKED4_SINGLE at source */ if ((did = H5Dopen2(fid_src, NAME_DATASET_CHUNKED4_SINGLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the copied dataset NAME_DATASET_CHUNKED4_SINGLE at destination */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED4_SINGLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); #endif /* H5_HAVE_FILTER_DEFLATE */ @@ -4948,7 +4948,7 @@ test_copy_dataset_no_edge_filt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim2d[0] = DIM_SIZE_1; @@ -4956,100 +4956,100 @@ test_copy_dataset_no_edge_filt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h /* create dataspace */ if ((sid = H5Screate_simple(2, dim2d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create and set comp & chunk plist, and disable partial chunk filters */ if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(pid, 2, chunk_dim2d) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_deflate(pid, 9) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk_opts(pid, H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_CHUNKED, H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close chunk plist */ if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the dataset */ if (test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; if (!test_open) { /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the dataset from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATASET_CHUNKED, fid_dst, NAME_DATASET_CHUNKED, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (!test_open) { /* open the dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_CHUNKED, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; } /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* H5Pset_chunk_opts() will set layout version to 4 which will use latest indexing available */ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_FARRAY) != TRUE) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); #endif /* H5_HAVE_FILTER_DEFLATE */ @@ -5121,7 +5121,7 @@ test_copy_dataset_compact(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim2d[0] = DIM_SIZE_1; @@ -5129,91 +5129,91 @@ test_copy_dataset_compact(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t /* create dataspace */ if ((sid = H5Screate_simple(2, dim2d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create and set compact plist */ if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_layout(pid, H5D_COMPACT) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_COMPACT, H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close chunk plist */ if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the dataset */ if (test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; if (!test_open) { /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the dataset from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATASET_COMPACT, fid_dst, NAME_DATASET_COMPACT, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (!test_open) { /* open the dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_COMPACT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; } /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_COMPACT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -5277,91 +5277,91 @@ test_copy_dataset_external(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim1d[0] = DIM_SIZE_1; /* create dataspace */ if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* set dataset creation plist */ size = DIM_SIZE_1 * sizeof(int); if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_external(pid, FILE_EXT, (off_t)0, size) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset at SRC file */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_EXTERNAL, H5T_NATIVE_INT, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* close external plist */ if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the dataset from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATASET_EXTERNAL, fid_dst, NAME_DATASET_EXTERNAL, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_EXTERNAL, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_EXTERNAL, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -5422,91 +5422,91 @@ test_copy_dataset_named_dtype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hi /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim1d[0] = DIM_SIZE_1; /* create dataspace */ if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create named datatype */ if ((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; if ((H5Tcommit2(fid_src, NAME_DATATYPE_SIMPLE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset at SRC file */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_NAMED_DTYPE, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the dataset from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATASET_NAMED_DTYPE, fid_dst, NAME_DATASET_NAMED_DTYPE, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_NAMED_DTYPE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_NAMED_DTYPE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -5568,111 +5568,111 @@ test_copy_dataset_named_dtype_hier(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create group to place all objects in */ if ((gid = H5Gcreate2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim1d[0] = DIM_SIZE_1; /* create dataspace */ if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create named datatype _inside_ hierarchy to copy */ if ((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; if ((H5Tcommit2(gid, NAME_DATATYPE_SIMPLE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create first dataset at SRC file */ if ((did = H5Dcreate2(gid, NAME_DATASET_NAMED_DTYPE, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* create second dataset at SRC file */ if ((did = H5Dcreate2(gid, NAME_DATASET_NAMED_DTYPE2, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* close group */ if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the dataset from SRC to DST */ if (H5Ocopy(fid_src, NAME_GROUP_TOP, fid_dst, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the group for copy */ if ((gid = H5Gopen2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* open the destination group */ if ((gid2 = H5Gopen2(fid_dst, NAME_GROUP_TOP, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Check if the groups are equal */ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination group */ if (H5Gclose(gid2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source group */ if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -5736,111 +5736,111 @@ test_copy_dataset_named_dtype_hier_outside(hid_t fcpl_src, hid_t fcpl_dst, hid_t /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create group to place all objects in */ if ((gid = H5Gcreate2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim1d[0] = DIM_SIZE_1; /* create dataspace */ if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create named datatype _outside_ hierarchy to copy */ if ((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; if ((H5Tcommit2(fid_src, NAME_DATATYPE_SIMPLE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create first dataset at SRC file */ if ((did = H5Dcreate2(gid, NAME_DATASET_NAMED_DTYPE, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* create second dataset at SRC file */ if ((did = H5Dcreate2(gid, NAME_DATASET_NAMED_DTYPE2, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* close group */ if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the dataset from SRC to DST */ if (H5Ocopy(fid_src, NAME_GROUP_TOP, fid_dst, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the group for copy */ if ((gid = H5Gopen2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* open the destination group */ if ((gid2 = H5Gopen2(fid_dst, NAME_GROUP_TOP, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Check if the groups are equal */ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination group */ if (H5Gclose(gid2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source group */ if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -5912,114 +5912,114 @@ test_copy_dataset_multi_ohdr_chunks(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fa /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create group to place all objects in */ if ((gid = H5Gcreate2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim1d[0] = DIM_SIZE_1; /* create dataspace */ if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create first dataset at SRC file */ if ((did = H5Dcreate2(gid, NAME_DATASET_MULTI_OHDR, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* create second dataset at SRC file */ if ((did2 = H5Dcreate2(gid, NAME_DATASET_MULTI_OHDR2, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* Add attributes to datasets in a way that creates lots of chunks */ if (test_copy_attach_paired_attributes(did, did2, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* close the first dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; if (!test_open) { /* close the second dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close group */ if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the dataset from SRC to DST */ if (H5Ocopy(fid_src, NAME_GROUP_TOP, fid_dst, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (test_open) { /* close the second dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; } else /* open the group for copy */ if ((gid = H5Gopen2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* open the destination group */ if ((gid2 = H5Gopen2(fid_dst, NAME_GROUP_TOP, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Check if the groups are equal */ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination group */ if (H5Gclose(gid2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source group */ if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -6082,114 +6082,114 @@ test_copy_dataset_attr_named_dtype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create group to place all objects in */ if ((gid = H5Gcreate2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim1d[0] = DIM_SIZE_1; /* create dataspace */ if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create named datatype _outside_ hierarchy to copy */ if ((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; if ((H5Tcommit2(fid_src, NAME_DATATYPE_SIMPLE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create first dataset at SRC file */ if ((did = H5Dcreate2(gid, NAME_DATASET_MULTI_OHDR, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* create second dataset at SRC file */ if ((did2 = H5Dcreate2(gid, NAME_DATASET_MULTI_OHDR2, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* Add attributes to datasets in a way that creates lots of chunks */ if (test_copy_attach_paired_attributes(did, did2, tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the first dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the second dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* close group */ if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the dataset from SRC to DST */ if (H5Ocopy(fid_src, NAME_GROUP_TOP, fid_dst, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the group for copy */ if ((gid = H5Gopen2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* open the destination group */ if ((gid2 = H5Gopen2(fid_dst, NAME_GROUP_TOP, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Check if the groups are equal */ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination group */ if (H5Gclose(gid2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source group */ if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -6257,99 +6257,99 @@ test_copy_dataset_contig_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_ /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim1d[0] = DIM_SIZE_1; /* create dataspace */ if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create datatype */ if ((tid = H5Tvlen_create(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset at SRC file */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_VL, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the dataset from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATASET_VL, fid_dst, NAME_DATASET_VL, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_VL, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_VL, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* Reclaim vlen buffer */ if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) { if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) - TEST_ERROR + TEST_ERROR; if (H5Treclaim(tid, sid, dxpl_id, buf) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(dxpl_id) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* close datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -6419,153 +6419,153 @@ test_copy_dataset_chunked_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim1d[0] = DIM_SIZE_1; /* create dataspace */ if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create datatype */ if ((tid = H5Tvlen_create(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; /* create and set chunk plist */ if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(pid, 1, chunk_dim1d) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset at SRC file */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_VL, tid, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* Set allocation time to early */ if (H5Pset_alloc_time(pid, H5D_ALLOC_TIME_EARLY) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset at SRC file */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_VL2, tid, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close chunk plist */ if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the dataset from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATASET_VL, fid_dst, NAME_DATASET_VL, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Ocopy(fid_src, NAME_DATASET_VL2, fid_dst, NAME_DATASET_VL2, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_VL, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_VL, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_VL2, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_VL2, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* Reclaim vlen buffer */ if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) { if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) - TEST_ERROR + TEST_ERROR; if (H5Treclaim(tid, sid, dxpl_id, buf) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(dxpl_id) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* close datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -6635,109 +6635,109 @@ test_copy_dataset_compact_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim1d[0] = DIM_SIZE_1; /* create dataspace */ if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create datatype */ if ((tid = H5Tvlen_create(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; /* create and set compact plist */ if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_layout(pid, H5D_COMPACT) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset at SRC file */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_VL, tid, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close compact plist */ if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the dataset from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATASET_VL, fid_dst, NAME_DATASET_VL, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_VL, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_VL, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* Reclaim vlen buffer */ if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) { if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) - TEST_ERROR + TEST_ERROR; if (H5Treclaim(tid, sid, dxpl_id, buf) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(dxpl_id) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* close datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -6794,7 +6794,7 @@ test_copy_attribute_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim2d[0] = DIM_SIZE_1; @@ -6802,84 +6802,84 @@ test_copy_attribute_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst /* create 2D dataspace */ if ((sid = H5Screate_simple(2, dim2d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create 2D int dataset at SRC file */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_SIMPLE, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* attach VL attribute to the dataset */ if (test_copy_attach_attribute_vl(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the dataset from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the attributes are equal */ if ((aid = H5Aopen_by_idx(did, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)0, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((aid2 = H5Aopen_by_idx(did2, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)0, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (compare_attribute(aid, aid2, H5P_DEFAULT, NULL, did) != TRUE) - TEST_ERROR + TEST_ERROR; if (H5Aclose(aid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(aid2) < 0) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -7010,60 +7010,60 @@ compare_attribute_compound_vlstr(hid_t loc, hid_t loc2) /* Open the attributes attached to the objects */ if ((aid = H5Aopen_by_idx(loc, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)0, H5P_DEFAULT, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; if ((aid2 = H5Aopen_by_idx(loc2, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)0, H5P_DEFAULT, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Get the attributes' datatypes */ if ((tid = H5Aget_type(aid)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; if ((tid2 = H5Aget_type(aid2)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Get the attributes' dataspaces */ if ((sid = H5Aget_space(aid)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; if ((sid2 = H5Aget_space(aid2)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Read the attributes */ if (H5Aread(aid, tid, &rbuf) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; if (H5Aread(aid2, tid2, &rbuf2) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Compare the attributes' data */ if (rbuf.i != rbuf2.i) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; if (HDstrlen(rbuf.v) != HDstrlen(rbuf2.v)) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; if (HDmemcmp(rbuf.v, rbuf2.v, HDstrlen(rbuf.v)) != 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Reclaim vlen buffer */ if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) - TEST_ERROR + TEST_ERROR; if (H5Treclaim(tid, sid, dxpl_id, &rbuf) < 0) - TEST_ERROR + TEST_ERROR; if (H5Treclaim(tid, sid, dxpl_id, &rbuf2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(dxpl_id) < 0) - TEST_ERROR + TEST_ERROR; /* Close the dataspaces */ if (H5Sclose(sid) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; if (H5Sclose(sid2) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Close the attributes */ if (H5Aclose(aid) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; if (H5Aclose(aid2) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; return TRUE; error: @@ -7123,7 +7123,7 @@ test_copy_attribute_compound_vlstr(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* set dataspace dimensions */ dim2d[0] = DIM_SIZE_1; @@ -7131,104 +7131,104 @@ test_copy_attribute_compound_vlstr(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap /* create 2D dataspace */ if ((sid = H5Screate_simple(2, dim2d, NULL)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* create 2D int dataset at SRC file */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_SIMPLE, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* attach an attribute to the dataset */ if (attach_attribute_compound_vlstr(did) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* create a group */ if ((gid = H5Gcreate2(fid_src, NAME_GROUP_EMPTY, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* attach attribute to the group */ if (attach_attribute_compound_vlstr(gid) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* close the group */ if (H5Gclose(gid) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* copy the dataset from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT, H5P_DEFAULT) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* open the src dataset */ if ((did = H5Dopen2(fid_src, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* compare the data of the attributes attached to the two datasets */ if (compare_attribute_compound_vlstr(did, did2) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* close the datasets */ if (H5Dclose(did2) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; if (H5Dclose(did) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Copy the group */ if (H5Ocopy(fid_src, NAME_GROUP_EMPTY, fid_dst, NAME_GROUP_EMPTY, H5P_DEFAULT, H5P_DEFAULT) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Open the src group */ if ((gid = H5Gopen2(fid_src, NAME_GROUP_EMPTY, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Open the destination group */ if ((gid2 = H5Gopen2(fid_dst, NAME_GROUP_EMPTY, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* compare the data of the attributes attached to the two groups */ if (compare_attribute_compound_vlstr(gid, gid2) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* close the groups */ if (H5Gclose(gid) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; if (H5Gclose(gid2) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; PASSED(); return 0; @@ -7311,7 +7311,7 @@ test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim2d[0] = DIM_SIZE_1; @@ -7319,104 +7319,104 @@ test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* create dataspace */ if ((sid = H5Screate_simple(2, dim2d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create datatype */ if ((tid = H5Tvlen_create(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; /* create and set comp & chunk plist */ if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(pid, 2, chunk_dim2d) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_deflate(pid, 9) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_CHUNKED, tid, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close chunk plist */ if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the dataset from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATASET_CHUNKED, fid_dst, NAME_DATASET_CHUNKED, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_CHUNKED, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* Reclaim vlen buffer */ if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) { if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) - TEST_ERROR + TEST_ERROR; if (H5Treclaim(tid, sid, dxpl_id, buf) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(dxpl_id) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* close datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); #endif /* H5_HAVE_FILTER_DEFLATE */ @@ -7473,68 +7473,68 @@ test_copy_group_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_ /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create group at the SRC file */ if ((gid = H5Gcreate2(fid_src, NAME_GROUP_EMPTY, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the group */ if (test_copy_attach_attributes(gid, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* close the group */ if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the group from SRC to DST */ if (H5Ocopy(fid_src, NAME_GROUP_EMPTY, fid_dst, NAME_GROUP_EMPTY, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the group for copy */ if ((gid = H5Gopen2(fid_src, NAME_GROUP_EMPTY, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* open the destination group */ if ((gid2 = H5Gopen2(fid_dst, NAME_GROUP_EMPTY, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Check if the groups are equal */ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination group */ if (H5Gclose(gid2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source group */ if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -7594,15 +7594,15 @@ test_copy_root_group(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_f /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create group at the SRC file */ if ((gid = H5Gcreate2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the group */ if (test_copy_attach_attributes(gid, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim2d[0] = DIM_SIZE_1; @@ -7610,87 +7610,87 @@ test_copy_root_group(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_f /* create dataspace */ if ((sid = H5Screate_simple(2, dim2d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* add a dataset to the group */ if ((did = H5Dcreate2(fid_src, NAME_GROUP_DATASET, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* create a sub-group */ if ((gid_sub = H5Gcreate2(fid_src, NAME_GROUP_SUB, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(gid_sub) < 0) - TEST_ERROR + TEST_ERROR; /* create another sub-group */ if ((gid_sub = H5Gcreate2(fid_src, NAME_GROUP_SUB_2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(gid_sub) < 0) - TEST_ERROR + TEST_ERROR; /* close the group */ if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the group from SRC to DST */ if (H5Ocopy(fid_src, "/", fid_dst, "/root_from_src", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the group for copy */ if ((gid = H5Gopen2(fid_src, "/", H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* open the destination group */ if ((gid2 = H5Gopen2(fid_dst, "/root_from_src", H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Check if the groups are equal */ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination group */ if (H5Gclose(gid2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source group */ if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -7753,15 +7753,15 @@ test_copy_group(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create group at the SRC file */ if ((gid = H5Gcreate2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the group */ if (test_copy_attach_attributes(gid, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim2d[0] = DIM_SIZE_1; @@ -7769,87 +7769,87 @@ test_copy_group(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) /* create dataspace */ if ((sid = H5Screate_simple(2, dim2d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* add a dataset to the group */ if ((did = H5Dcreate2(fid_src, NAME_GROUP_DATASET, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* create a sub-group */ if ((gid_sub = H5Gcreate2(fid_src, NAME_GROUP_SUB, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(gid_sub) < 0) - TEST_ERROR + TEST_ERROR; /* create another sub-group */ if ((gid_sub = H5Gcreate2(fid_src, NAME_GROUP_SUB_2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(gid_sub) < 0) - TEST_ERROR + TEST_ERROR; /* close the group */ if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the group from SRC to DST */ if (H5Ocopy(fid_src, NAME_GROUP_TOP, fid_dst, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the group for copy */ if ((gid = H5Gopen2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* open the destination group */ if ((gid2 = H5Gopen2(fid_dst, NAME_GROUP_TOP, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Check if the groups are equal */ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination group */ if (H5Gclose(gid2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source group */ if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -7913,15 +7913,15 @@ test_copy_group_deep(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_f /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create group at the SRC file */ if ((gid = H5Gcreate2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the group */ if (test_copy_attach_attributes(gid, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim2d[0] = DIM_SIZE_1; @@ -7929,18 +7929,18 @@ test_copy_group_deep(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_f /* create dataspace */ if ((sid = H5Screate_simple(2, dim2d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create nested sub-groups & datasets */ for (i = 0; i < NUM_SUB_GROUPS; i++) { HDsprintf(objname, "Group #%d", i); if ((gid_sub = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; for (j = 0; j < NUM_SUB_GROUPS; j++) { HDsprintf(objname, "Group #%d", j); if ((gid_sub2 = H5Gcreate2(gid_sub, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; for (k = 0; k < NUM_DATASETS; k++) { HDsprintf(objname, "Dataset #%d", k); @@ -7948,77 +7948,77 @@ test_copy_group_deep(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_f /* add a dataset to the group */ if ((did = H5Dcreate2(gid_sub2, objname, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; } /* end for */ if (H5Gclose(gid_sub2) < 0) - TEST_ERROR + TEST_ERROR; } /* end for */ if (H5Gclose(gid_sub) < 0) - TEST_ERROR + TEST_ERROR; } /* end for */ /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* close the group */ if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the group from SRC to DST */ if (H5Ocopy(fid_src, NAME_GROUP_TOP, fid_dst, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the group for copy */ if ((gid = H5Gopen2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* open the destination group */ if ((gid2 = H5Gopen2(fid_dst, NAME_GROUP_TOP, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Check if the groups are equal */ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination group */ if (H5Gclose(gid2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source group */ if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -8071,87 +8071,87 @@ test_copy_group_loop(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_f /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create group at the SRC file */ if ((gid = H5Gcreate2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the group */ if (test_copy_attach_attributes(gid, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* create sub-groups */ if ((gid_sub = H5Gcreate2(gid, NAME_GROUP_SUB, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((gid_sub2 = H5Gcreate2(gid, NAME_GROUP_SUB_SUB, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Create link to top group */ if (H5Lcreate_hard(gid, ".", gid_sub2, NAME_GROUP_LOOP, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* close sub sub group */ if (H5Gclose(gid_sub2) < 0) - TEST_ERROR + TEST_ERROR; /* close sub group */ if (H5Gclose(gid_sub) < 0) - TEST_ERROR + TEST_ERROR; /* close the group */ if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the group from SRC to DST */ if (H5Ocopy(fid_src, NAME_GROUP_TOP, fid_dst, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the group for copy */ if ((gid = H5Gopen2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* open the destination group */ if ((gid2 = H5Gopen2(fid_dst, NAME_GROUP_TOP, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Check if the groups are equal */ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination group */ if (H5Gclose(gid2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source group */ if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -8210,101 +8210,101 @@ test_copy_group_wide_loop(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create group at the SRC file */ if ((gid = H5Gcreate2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the group */ if (test_copy_attach_attributes(gid, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* create wide sub-group hierarchy, with multiple links to higher groups */ for (u = 0; u < NUM_WIDE_LOOP_GROUPS; u++) { HDsprintf(objname, "%s-%u", NAME_GROUP_SUB, u); if ((gid_sub = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; for (v = 0; v < NUM_WIDE_LOOP_GROUPS; v++) { HDsprintf(objname, "%s-%u", NAME_GROUP_SUB_SUB2, v); if ((gid_sub2 = H5Gcreate2(gid_sub, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Create link to top group */ if (H5Lcreate_hard(gid, ".", gid_sub2, NAME_GROUP_LOOP, H5P_DEFAULT, H5P_DEFAULT) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Create link to sub-group */ if (H5Lcreate_hard(gid_sub, ".", gid_sub2, NAME_GROUP_LOOP2, H5P_DEFAULT, H5P_DEFAULT) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Create link to self :-) */ if (H5Lcreate_hard(gid_sub2, ".", gid_sub2, NAME_GROUP_LOOP3, H5P_DEFAULT, H5P_DEFAULT) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* close sub sub group */ if (H5Gclose(gid_sub2) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; } /* end for */ /* close sub group */ if (H5Gclose(gid_sub) < 0) - TEST_ERROR + TEST_ERROR; } /* end for */ /* close the group */ if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the group from SRC to DST */ if (H5Ocopy(fid_src, NAME_GROUP_TOP, fid_dst, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the group for copy */ if ((gid = H5Gopen2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* open the destination group */ if ((gid2 = H5Gopen2(fid_dst, NAME_GROUP_TOP, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Check if the groups are equal */ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination group */ if (H5Gclose(gid2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source group */ if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -8373,23 +8373,23 @@ test_copy_group_links(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_ /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create file to hold external dataset */ if ((fid_ext = H5Fcreate(ext_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create groups at the SRC file. Group 2 will hold dangling links. */ if ((gid = H5Gcreate2(fid_src, NAME_GROUP_LINK, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((gid2 = H5Gcreate2(fid_src, NAME_GROUP_LINK2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the groups */ if (test_copy_attach_attributes(gid, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; if (test_copy_attach_attributes(gid2, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim2d[0] = DIM_SIZE_1; @@ -8397,22 +8397,22 @@ test_copy_group_links(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_ /* create dataspace */ if ((sid = H5Screate_simple(2, dim2d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* add a dataset to the group */ if ((did = H5Dcreate2(fid_src, NAME_LINK_DATASET, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* Now create a 1-D dataset in an external file */ /* Set dataspace dimensions */ @@ -8420,61 +8420,61 @@ test_copy_group_links(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_ /* create dataspace */ if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* add a dataset to the external file */ if ((did = H5Dcreate2(fid_ext, NAME_DATASET_SIMPLE, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* make a hard link to the dataset */ if (H5Lcreate_hard(fid_src, NAME_LINK_DATASET, H5L_SAME_LOC, NAME_LINK_HARD, H5P_DEFAULT, H5P_DEFAULT) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* make a soft link to the dataset */ if (H5Lcreate_soft(NAME_LINK_DATASET, fid_src, NAME_LINK_SOFT, H5P_DEFAULT, H5P_DEFAULT) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* make an external link to the external dataset */ if (H5Lcreate_external(ext_filename, NAME_DATASET_SIMPLE, fid_src, NAME_LINK_EXTERN, H5P_DEFAULT, H5P_DEFAULT) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* make a dangling soft link */ if (H5Lcreate_soft("nowhere", fid_src, NAME_LINK_SOFT_DANGLE2, H5P_DEFAULT, H5P_DEFAULT) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* make a dangling external link */ if (H5Lcreate_external("no_file", "no_object", fid_src, NAME_LINK_EXTERN_DANGLE2, H5P_DEFAULT, H5P_DEFAULT) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* close the groups */ if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(gid2) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC and EXT files */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(fid_ext) < 0) - TEST_ERROR + TEST_ERROR; /* Create the object copy plist */ if ((plid = H5Pcreate(H5P_OBJECT_COPY)) < 0) - TEST_ERROR + TEST_ERROR; /* Loop over all configurations (expand soft/external links) */ for (expand_soft = 0; expand_soft <= 1; expand_soft++) { @@ -8486,32 +8486,32 @@ test_copy_group_links(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_ if (expand_ext) copy_options |= H5O_COPY_EXPAND_EXT_LINK_FLAG; if (H5Pset_copy_object(plid, copy_options) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files * aren't the same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the group from SRC to DST */ if (H5Ocopy(fid_src, NAME_GROUP_LINK, fid_dst, NAME_GROUP_LINK, plid, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the group for copy */ if ((gid = H5Gopen2(fid_src, NAME_GROUP_LINK, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* open the destination group */ if ((gid2 = H5Gopen2(fid_dst, NAME_GROUP_LINK, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* If expand_soft is set to true, verify that the soft link is now a * hard link, and compare the expanded dataset, then delete it and @@ -8519,29 +8519,29 @@ test_copy_group_links(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_ if (expand_soft) { /* Check link type */ if (H5Lget_info2(fid_dst, NAME_LINK_SOFT, &linfo, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (linfo.type != H5L_TYPE_HARD) - FAIL_PUTS_ERROR("Soft link was not expanded to a hard link") + FAIL_PUTS_ERROR("Soft link was not expanded to a hard link"); /* Compare datasets */ if ((did = H5Dopen2(fid_src, NAME_LINK_DATASET, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((did2 = H5Dopen2(fid_dst, NAME_LINK_SOFT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) - TEST_ERROR + TEST_ERROR; /* Delete expanded dataset, add soft link */ if (H5Ldelete(fid_dst, NAME_LINK_SOFT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_soft(NAME_LINK_DATASET, fid_dst, NAME_LINK_SOFT, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* Close datasets */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* If expand_ext is set to true, verify that the external link is @@ -8550,83 +8550,83 @@ test_copy_group_links(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_ if (expand_ext) { /* Check link type */ if (H5Lget_info2(fid_dst, NAME_LINK_EXTERN, &linfo, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (linfo.type != H5L_TYPE_HARD) - FAIL_PUTS_ERROR("External link was not expanded to a hard link") + FAIL_PUTS_ERROR("External link was not expanded to a hard link"); /* Compare datasets */ if ((fid_ext = H5Fopen(ext_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; if ((did = H5Dopen2(fid_ext, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((did2 = H5Dopen2(fid_dst, NAME_LINK_EXTERN, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) - TEST_ERROR + TEST_ERROR; /* Delete expanded dataset, add external link */ if (H5Ldelete(fid_dst, NAME_LINK_EXTERN, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_external(ext_filename, NAME_DATASET_SIMPLE, fid_dst, NAME_LINK_EXTERN, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* Close datasets and external file */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(fid_ext) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* Check if the groups are equal */ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination group */ if (H5Gclose(gid2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source group */ if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* Now try to copy the group containing the dangling link. They * should always be copied as the same type of link, never expanded * to hard links. */ if (H5Ocopy(fid_src, NAME_GROUP_LINK2, fid_dst, NAME_GROUP_LINK2, plid, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* Open the original and copied groups */ if ((gid = H5Gopen2(fid_src, NAME_GROUP_LINK2, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((gid2 = H5Gopen2(fid_dst, NAME_GROUP_LINK2, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Compare the groups */ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE) - TEST_ERROR + TEST_ERROR; /* Close groups */ if (H5Gclose(gid2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; } /* end for */ } /* end for */ /* Close the object copy plist */ if (H5Pclose(plid) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -8699,15 +8699,15 @@ test_copy_soft_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fa /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create group at the SRC file */ if ((gid = H5Gcreate2(fid_src, NAME_GROUP_LINK, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the group */ if (test_copy_attach_attributes(gid, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim2d[0] = DIM_SIZE_1; @@ -8715,83 +8715,83 @@ test_copy_soft_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fa /* create dataspace */ if ((sid = H5Screate_simple(2, dim2d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* add a dataset to the group */ if ((did = H5Dcreate2(fid_src, NAME_LINK_DATASET, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* close the group */ if (H5Gclose(gid) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* make a soft link to the dataset */ if (H5Lcreate_soft(NAME_LINK_DATASET, fid_src, NAME_LINK_SOFT, H5P_DEFAULT, H5P_DEFAULT) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; if (!test_open) { /* close the dataset */ if (H5Dclose(did) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the dataset from SRC to DST */ if (H5Ocopy(fid_src, NAME_LINK_SOFT, fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (!test_open) { /* open the dataset through the soft link for copy */ if ((did = H5Dopen2(fid_src, NAME_LINK_SOFT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; } /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -8854,15 +8854,15 @@ test_copy_ext_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fap /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create group at the SRC file */ if ((gid = H5Gcreate2(fid_src, NAME_GROUP_LINK, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the group */ if (test_copy_attach_attributes(gid, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim2d[0] = DIM_SIZE_1; @@ -8870,92 +8870,92 @@ test_copy_ext_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fap /* create dataspace */ if ((sid = H5Screate_simple(2, dim2d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* add a dataset to the group */ if ((did = H5Dcreate2(fid_src, NAME_LINK_DATASET, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the group */ if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* create file to hold external links to the src file */ if ((fid_ext = H5Fcreate(ext_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create group in the file that will hold the external link */ if ((gid = H5Gcreate2(fid_ext, NAME_GROUP_LINK, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an external link to the dataset in the source file */ if (H5Lcreate_external(src_filename, NAME_LINK_DATASET, fid_ext, NAME_LINK_EXTERN, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* close the group and file */ if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(fid_ext) < 0) - TEST_ERROR + TEST_ERROR; /* open the "extern" file with read-only */ if ((fid_ext = H5Fopen(ext_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the dataset from SRC to DST */ if (H5Ocopy(fid_ext, NAME_LINK_EXTERN, fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset through the external link */ if ((did = H5Dopen2(fid_ext, NAME_LINK_EXTERN, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the EXT file */ if (H5Fclose(fid_ext) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -9017,7 +9017,7 @@ test_copy_exist(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim2d[0] = DIM_SIZE_1; @@ -9025,49 +9025,49 @@ test_copy_exist(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) /* create 2D dataspace */ if ((sid = H5Screate_simple(2, dim2d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create 2D int dataset at SRC file */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_SIMPLE, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the dataset */ if (test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the dataset from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* try to copy the dataset from SRC to DST again (should fail) */ H5E_BEGIN_TRY @@ -9076,15 +9076,15 @@ test_copy_exist(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) } H5E_END_TRY; if (ret >= 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -9145,7 +9145,7 @@ test_copy_path(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim2d[0] = DIM_SIZE_1; @@ -9153,45 +9153,45 @@ test_copy_path(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) /* create 2D dataspace */ if ((sid = H5Screate_simple(2, dim2d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create 2D int dataset at SRC file */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_SIMPLE, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the dataset */ if (test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the dataset from SRC to DST (should fail - intermediate groups not there) */ H5E_BEGIN_TRY @@ -9200,55 +9200,55 @@ test_copy_path(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) } H5E_END_TRY; if (ret >= 0) - TEST_ERROR + TEST_ERROR; /* Create the intermediate groups in destination file */ if ((gid = H5Gcreate2(fid_dst, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; if ((gid = H5Gcreate2(fid_dst, NAME_GROUP_SUB, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; if ((gid = H5Gcreate2(fid_dst, NAME_GROUP_SUB_SUB, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* copy the dataset from SRC to DST, using full path */ if (H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_dst, NAME_DATASET_SUB_SUB, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_SUB_SUB, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -9297,39 +9297,39 @@ test_copy_same_file_named_datatype(hid_t fcpl_src, hid_t fapl) /* create source file */ if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create datatype */ if ((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; /* create named datatype */ if ((H5Tcommit2(fid, NAME_DATATYPE_SIMPLE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the datatype from SRC to DST */ if (H5Ocopy(fid, NAME_DATATYPE_SIMPLE, fid, NAME_DATATYPE_SIMPLE2, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the copied datatype */ if ((tid2 = H5Topen2(fid, NAME_DATATYPE_SIMPLE2, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Compare the datatypes */ if (H5Tequal(tid, tid2) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination datatype */ if (H5Tclose(tid2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the file */ if (H5Fclose(fid) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -9386,64 +9386,64 @@ test_copy_old_layout(hid_t fcpl_dst, hid_t fapl, hbool_t test_open) /* Setup */ if ((src_fapl = h5_fileaccess_flags(H5_FILEACCESS_LIBVER)) < 0) - TEST_ERROR + TEST_ERROR; /* open source file (read-only) */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Close source FAPL */ if (H5Pclose(src_fapl) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (test_open) { /* open the source dataset */ if ((did = H5Dopen2(fid_src, NAME_OLD_FORMAT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; } /* copy the dataset from SRC to DST */ if (H5Ocopy(fid_src, NAME_OLD_FORMAT, fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (!test_open) { /* open the source dataset */ if ((did = H5Dopen2(fid_src, NAME_OLD_FORMAT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; } /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -9509,121 +9509,121 @@ test_copy_dataset_compact_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim1d[0] = DIM_SIZE_1; /* create dataspace */ if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create datatype */ if ((tid = H5Tvlen_create(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; /* make a copy of the datatype for later use */ if ((tid_copy = H5Tcopy(tid)) < 0) - TEST_ERROR + TEST_ERROR; /* named datatype */ if ((H5Tcommit2(fid_src, NAME_DATATYPE_VL, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create and set compact plist */ if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_layout(pid, H5D_COMPACT) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset at SRC file */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_VL, tid, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close compact plist */ if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the dataset from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATASET_VL, fid_dst, NAME_DATASET_VL, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_VL, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_VL, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* Reclaim vlen buffer */ if (H5Tdetect_class(tid_copy, H5T_VLEN) == TRUE) { if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) - TEST_ERROR + TEST_ERROR; if (H5Treclaim(tid_copy, sid, dxpl_id, buf) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(dxpl_id) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* close datatype */ if (H5Tclose(tid_copy) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -9693,111 +9693,111 @@ test_copy_dataset_contig_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim1d[0] = DIM_SIZE_1; /* create dataspace */ if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create datatype */ if ((tid = H5Tvlen_create(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; /* make a copy of the datatype for later use */ if ((tid_copy = H5Tcopy(tid)) < 0) - TEST_ERROR + TEST_ERROR; /* named datatype */ if ((H5Tcommit2(fid_src, NAME_DATATYPE_VL, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset at SRC file */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_VL, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the dataset from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATASET_VL, fid_dst, NAME_DATASET_VL, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_VL, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_VL, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* Reclaim vlen buffer */ if (H5Tdetect_class(tid_copy, H5T_VLEN) == TRUE) { if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) - TEST_ERROR + TEST_ERROR; if (H5Treclaim(tid_copy, sid, dxpl_id, buf) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(dxpl_id) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* close datatype */ if (H5Tclose(tid_copy) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -9877,126 +9877,126 @@ test_copy_dataset_chunked_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim1d[0] = DIM_SIZE_1; /* create dataspace */ if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create datatype */ if ((tid = H5Tvlen_create(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; /* make a copy of the datatype for later use */ if ((tid_copy = H5Tcopy(tid)) < 0) - TEST_ERROR + TEST_ERROR; /* named datatype */ if ((H5Tcommit2(fid_src, NAME_DATATYPE_VL, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create and set chunk plist */ if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(pid, 1, chunk_dim1d) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset at SRC file */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_VL, tid, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close compact plist */ if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (!test_open) { /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the dataset from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATASET_VL, fid_dst, NAME_DATASET_VL, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (!test_open) { /* open the dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_VL, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; } /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_VL, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* Reclaim vlen buffer */ if (H5Tdetect_class(tid_copy, H5T_VLEN) == TRUE) { if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) - TEST_ERROR + TEST_ERROR; if (H5Treclaim(tid_copy, sid, dxpl_id, buf) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(dxpl_id) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* close datatype */ if (H5Tclose(tid_copy) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -10068,123 +10068,123 @@ test_copy_dataset_compressed_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_ /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim1d[0] = DIM_SIZE_1; /* create dataspace */ if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create datatype */ if ((tid = H5Tvlen_create(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; /* make a copy of the datatype for later use */ if ((tid_copy = H5Tcopy(tid)) < 0) - TEST_ERROR + TEST_ERROR; /* named datatype */ if ((H5Tcommit2(fid_src, NAME_DATATYPE_VL, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create and set chunk plist */ if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(pid, 1, chunk_dim1d) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_deflate(pid, 9) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset at SRC file */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_VL, tid, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close compact plist */ if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the dataset from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATASET_VL, fid_dst, NAME_DATASET_VL, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_VL, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_VL, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* Reclaim vlen buffer */ if (H5Tdetect_class(tid_copy, H5T_VLEN) == TRUE) { if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) - TEST_ERROR + TEST_ERROR; if (H5Treclaim(tid_copy, sid, dxpl_id, buf) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(dxpl_id) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* close datatype */ if (H5Tclose(tid_copy) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -10268,115 +10268,115 @@ test_copy_dataset_compact_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim1d[0] = DIM_SIZE_1; /* create dataspace */ if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create datatype */ if ((tid = H5Tvlen_create(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; /* create nested VL datatype */ if ((tid2 = H5Tvlen_create(tid)) < 0) - TEST_ERROR + TEST_ERROR; /* create and set compact plist */ if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_layout(pid, H5D_COMPACT) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset at SRC file */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_VL_VL, tid2, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, tid2, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close compact plist */ if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the dataset from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATASET_VL_VL, fid_dst, NAME_DATASET_VL_VL, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_VL_VL, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_VL_VL, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* Reclaim vlen buffer */ if (H5Tdetect_class(tid2, H5T_VLEN) == TRUE) { if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) - TEST_ERROR + TEST_ERROR; if (H5Treclaim(tid2, sid, dxpl_id, buf) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(dxpl_id) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* close datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid2) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -10445,14 +10445,14 @@ test_copy_dataset_contig_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h buf[i].p = HDmalloc((i + 1) * sizeof(hvl_t)); if (buf[i].p == NULL) { TestErrPrintf("Cannot allocate memory for VL data! i=%u\n", i); - TEST_ERROR + TEST_ERROR; } /* end if */ buf[i].len = i + 1; for (tvl = (hvl_t *)buf[i].p, j = 0; j < (i + 1); j++, tvl++) { tvl->p = HDmalloc((j + 1) * sizeof(unsigned int)); if (tvl->p == NULL) { TestErrPrintf("Cannot allocate memory for VL data! i=%u, j=%u\n", i, j); - TEST_ERROR + TEST_ERROR; } /* end if */ tvl->len = j + 1; for (k = 0; k < (j + 1); k++) @@ -10469,117 +10469,117 @@ test_copy_dataset_contig_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim1d[0] = DIM_SIZE_1; /* create dataspace */ if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create datatype */ if ((tid = H5Tvlen_create(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; /* create nested VL datatype */ if ((tid2 = H5Tvlen_create(tid)) < 0) - TEST_ERROR + TEST_ERROR; /* create and set compact plist */ if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset at SRC file */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_VL_VL, tid2, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, tid2, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close compact plist */ if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; if (!test_open) { /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the dataset from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATASET_VL_VL, fid_dst, NAME_DATASET_VL_VL, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (!test_open) { /* open the dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_VL_VL, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; } /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_VL_VL, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* Reclaim vlen buffer */ if (H5Tdetect_class(tid2, H5T_VLEN) == TRUE) { if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) - TEST_ERROR + TEST_ERROR; if (H5Treclaim(tid2, sid, dxpl_id, buf) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(dxpl_id) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* close datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid2) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -10640,14 +10640,14 @@ test_copy_dataset_chunked_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, buf[i].p = HDmalloc((i + 1) * sizeof(hvl_t)); if (buf[i].p == NULL) { TestErrPrintf("Cannot allocate memory for VL data! i=%u\n", i); - TEST_ERROR + TEST_ERROR; } /* end if */ buf[i].len = i + 1; for (tvl = (hvl_t *)buf[i].p, j = 0; j < (i + 1); j++, tvl++) { tvl->p = HDmalloc((j + 1) * sizeof(unsigned int)); if (tvl->p == NULL) { TestErrPrintf("Cannot allocate memory for VL data! i=%u, j=%u\n", i, j); - TEST_ERROR + TEST_ERROR; } /* end if */ tvl->len = j + 1; for (k = 0; k < (j + 1); k++) @@ -10664,157 +10664,157 @@ test_copy_dataset_chunked_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim1d[0] = DIM_SIZE_1; /* create dataspace */ if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create datatype */ if ((tid = H5Tvlen_create(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; /* create nested VL datatype */ if ((tid2 = H5Tvlen_create(tid)) < 0) - TEST_ERROR + TEST_ERROR; /* create and set chunk plist */ if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(pid, 1, chunk_dim1d) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset at SRC file */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_VL_VL, tid2, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, tid2, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* Set allocation time to early */ if (H5Pset_alloc_time(pid, H5D_ALLOC_TIME_EARLY) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset at SRC file */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_VL_VL2, tid2, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, tid2, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close plist */ if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the dataset from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATASET_VL_VL, fid_dst, NAME_DATASET_VL_VL, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Ocopy(fid_src, NAME_DATASET_VL_VL2, fid_dst, NAME_DATASET_VL_VL2, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_VL_VL, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_VL_VL, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_VL_VL2, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_VL_VL2, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != TRUE) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* Reclaim vlen buffer */ if (H5Tdetect_class(tid2, H5T_VLEN) == TRUE) { if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) - TEST_ERROR + TEST_ERROR; if (H5Treclaim(tid2, sid, dxpl_id, buf) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(dxpl_id) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* close datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid2) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -10884,14 +10884,14 @@ test_copy_dataset_compressed_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap buf[i].p = HDmalloc((i + 1) * sizeof(hvl_t)); if (buf[i].p == NULL) { TestErrPrintf("Cannot allocate memory for VL data! i=%u\n", i); - TEST_ERROR + TEST_ERROR; } /* end if */ buf[i].len = i + 1; for (tvl = (hvl_t *)buf[i].p, j = 0; j < (i + 1); j++, tvl++) { tvl->p = HDmalloc((j + 1) * sizeof(unsigned int)); if (tvl->p == NULL) { TestErrPrintf("Cannot allocate memory for VL data! i=%u, j=%u\n", i, j); - TEST_ERROR + TEST_ERROR; } /* end if */ tvl->len = j + 1; for (k = 0; k < (j + 1); k++) @@ -10908,120 +10908,120 @@ test_copy_dataset_compressed_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim1d[0] = DIM_SIZE_1; /* create dataspace */ if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create datatype */ if ((tid = H5Tvlen_create(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; /* create nested VL datatype */ if ((tid2 = H5Tvlen_create(tid)) < 0) - TEST_ERROR + TEST_ERROR; /* create and set chunk plist */ if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(pid, 1, chunk_dim1d) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_deflate(pid, 9) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset at SRC file */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_VL_VL, tid2, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, tid2, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close compact plist */ if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; if (!test_open) { /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the dataset from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATASET_VL_VL, fid_dst, NAME_DATASET_VL_VL, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (!test_open) { /* open the dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_VL_VL, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; } /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_VL_VL, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* Reclaim vlen buffer */ if (H5Tdetect_class(tid2, H5T_VLEN) == TRUE) { if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) - TEST_ERROR + TEST_ERROR; if (H5Treclaim(tid2, sid, dxpl_id, buf) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(dxpl_id) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* close datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid2) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -11104,110 +11104,110 @@ test_copy_dataset_contig_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim1d[0] = DIM_SIZE_1; /* create dataspace */ if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create datatype */ if ((tid2 = H5Tvlen_create(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Tcreate(H5T_COMPOUND, sizeof(cmpd_vl_t))) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tinsert(tid, "a", HOFFSET(cmpd_vl_t, a), H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tinsert(tid, "b", HOFFSET(cmpd_vl_t, b), tid2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tinsert(tid, "c", HOFFSET(cmpd_vl_t, c), H5T_NATIVE_DOUBLE) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset at SRC file */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_CMPD_VL, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the dataset from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATASET_CMPD_VL, fid_dst, NAME_DATASET_CMPD_VL, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_CMPD_VL, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CMPD_VL, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* Reclaim vlen buffer */ if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) { if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) - TEST_ERROR + TEST_ERROR; if (H5Treclaim(tid, sid, dxpl_id, buf) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(dxpl_id) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* close datatype */ if (H5Tclose(tid2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -11280,119 +11280,119 @@ test_copy_dataset_chunked_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim1d[0] = DIM_SIZE_1; /* create dataspace */ if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create datatype */ if ((tid2 = H5Tvlen_create(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Tcreate(H5T_COMPOUND, sizeof(cmpd_vl_t))) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tinsert(tid, "a", HOFFSET(cmpd_vl_t, a), H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tinsert(tid, "b", HOFFSET(cmpd_vl_t, b), tid2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tinsert(tid, "c", HOFFSET(cmpd_vl_t, c), H5T_NATIVE_DOUBLE) < 0) - TEST_ERROR + TEST_ERROR; /* create and set chunk plist */ if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(pid, 1, chunk_dim1d) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset at SRC file */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_CMPD_VL, tid, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close chunk plist */ if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the dataset from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATASET_CMPD_VL, fid_dst, NAME_DATASET_CMPD_VL, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_CMPD_VL, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CMPD_VL, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* Reclaim vlen buffer */ if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) { if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) - TEST_ERROR + TEST_ERROR; if (H5Treclaim(tid, sid, dxpl_id, buf) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(dxpl_id) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* close datatype */ if (H5Tclose(tid2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -11465,119 +11465,119 @@ test_copy_dataset_compact_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim1d[0] = DIM_SIZE_1; /* create dataspace */ if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create datatype */ if ((tid2 = H5Tvlen_create(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Tcreate(H5T_COMPOUND, sizeof(cmpd_vl_t))) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tinsert(tid, "a", HOFFSET(cmpd_vl_t, a), H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tinsert(tid, "b", HOFFSET(cmpd_vl_t, b), tid2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tinsert(tid, "c", HOFFSET(cmpd_vl_t, c), H5T_NATIVE_DOUBLE) < 0) - TEST_ERROR + TEST_ERROR; /* create and set compact plist */ if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_layout(pid, H5D_COMPACT) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset at SRC file */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_CMPD_VL, tid, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close compact plist */ if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy the dataset from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATASET_CMPD_VL, fid_dst, NAME_DATASET_CMPD_VL, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the dataset for copy */ if ((did = H5Dopen2(fid_src, NAME_DATASET_CMPD_VL, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination dataset */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CMPD_VL, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the destination dataset */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the source dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* Reclaim vlen buffer */ if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) { if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) - TEST_ERROR + TEST_ERROR; if (H5Treclaim(tid, sid, dxpl_id, buf) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(dxpl_id) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* close datatype */ if (H5Tclose(tid2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -11648,131 +11648,131 @@ test_copy_null_ref(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fap /* Create source file */ if ((fid1 = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create dataspace */ if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* Create object reference dataset at SRC file */ if ((did1 = H5Dcreate2(fid1, "obj_ref_dset", H5T_STD_REF_OBJ, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Create region reference dataset at SRC file */ if ((did2 = H5Dcreate2(fid1, "reg_ref_dset", H5T_STD_REF_DSETREG, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Create references */ if (H5Rcreate(&obj_buf[0], did1, ".", H5R_OBJECT, (hid_t)-1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Rcreate(&obj_buf[1], did2, ".", H5R_OBJECT, (hid_t)-1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Rcreate(®_buf[0], did1, ".", H5R_DATASET_REGION, sid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Rcreate(®_buf[1], did2, ".", H5R_DATASET_REGION, sid) < 0) - TEST_ERROR + TEST_ERROR; /* Write data into file */ if (H5Dwrite(did1, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, obj_buf) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dwrite(did2, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, reg_buf) < 0) - TEST_ERROR + TEST_ERROR; /* Close datasets */ if (H5Dclose(did1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* Create middle file */ if ((fid2 = H5Fcreate(mid_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Copy the source file to the middle file. Note the expand references * flag is not set. */ if (H5Ocopy(fid1, "/", fid2, "/A", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* Close source file */ if (H5Fclose(fid1) < 0) - TEST_ERROR + TEST_ERROR; /* Open copied datasets */ if ((did1 = H5Dopen2(fid2, "/A/obj_ref_dset", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((did2 = H5Dopen2(fid2, "/A/reg_ref_dset", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Read copied datasets */ if (H5Dread(did1, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, obj_buf) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dread(did2, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, reg_buf) < 0) - TEST_ERROR + TEST_ERROR; /* Verify that the references contain only "0" bytes */ if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)) != 0) - TEST_ERROR + TEST_ERROR; if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)) != 0) - TEST_ERROR + TEST_ERROR; /* Close datasets */ if (H5Dclose(did1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* Create destination file */ if ((fid1 = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create object copy property list */ if ((pid = H5Pcreate(H5P_OBJECT_COPY)) < 0) - TEST_ERROR + TEST_ERROR; /* Set the "expand references" flag */ if (H5Pset_copy_object(pid, H5O_COPY_EXPAND_REFERENCE_FLAG) < 0) - TEST_ERROR + TEST_ERROR; /* Copy the middle file to the destination file. Note the expand references * flag *is* set, even though the references are now NULL. */ if (H5Ocopy(fid2, "/", fid1, "/AA", pid, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* Close source file */ if (H5Fclose(fid2) < 0) - TEST_ERROR + TEST_ERROR; /* Open copied datasets */ if ((did1 = H5Dopen2(fid1, "/AA/A/obj_ref_dset", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((did2 = H5Dopen2(fid1, "/AA/A/reg_ref_dset", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Read copied datasets */ if (H5Dread(did1, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, obj_buf) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dread(did2, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, reg_buf) < 0) - TEST_ERROR + TEST_ERROR; /* Verify that the references contain only "0" bytes */ if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)) != 0) - TEST_ERROR + TEST_ERROR; if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)) != 0) - TEST_ERROR + TEST_ERROR; /* Close */ if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(fid1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -11846,142 +11846,142 @@ test_copy_null_ref_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds /* Create source file */ if ((fid1 = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create dataspace */ if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create and set chunk plist */ if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(dcpl, 1, chunk_dim1d) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_deflate(dcpl, 9) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk_opts(dcpl, H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS) < 0) - TEST_ERROR + TEST_ERROR; /* Create object reference dataset at SRC file */ if ((did1 = H5Dcreate2(fid1, "obj_ref_dset", H5T_STD_REF_OBJ, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Create region reference dataset at SRC file */ if ((did2 = H5Dcreate2(fid1, "reg_ref_dset", H5T_STD_REF_DSETREG, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Create references */ if (H5Rcreate(&obj_buf[0], did1, ".", H5R_OBJECT, (hid_t)-1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Rcreate(&obj_buf[1], did2, ".", H5R_OBJECT, (hid_t)-1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Rcreate(®_buf[0], did1, ".", H5R_DATASET_REGION, sid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Rcreate(®_buf[1], did2, ".", H5R_DATASET_REGION, sid) < 0) - TEST_ERROR + TEST_ERROR; /* Write data into file */ if (H5Dwrite(did1, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, obj_buf) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dwrite(did2, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, reg_buf) < 0) - TEST_ERROR + TEST_ERROR; /* Create middle file */ if ((fid2 = H5Fcreate(mid_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Copy the source file to the middle file. Note the expand references * flag is not set. */ if (H5Ocopy(fid1, "/", fid2, "/A", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* Close datasets in source file */ if (H5Dclose(did1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* Close source file */ if (H5Fclose(fid1) < 0) - TEST_ERROR + TEST_ERROR; /* Open copied datasets */ if ((did3 = H5Dopen2(fid2, "/A/obj_ref_dset", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((did4 = H5Dopen2(fid2, "/A/reg_ref_dset", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Read copied datasets */ if (H5Dread(did3, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, obj_buf) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dread(did4, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, reg_buf) < 0) - TEST_ERROR + TEST_ERROR; /* Verify that the references contain only "0" bytes */ if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)) != 0) - TEST_ERROR + TEST_ERROR; if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)) != 0) - TEST_ERROR + TEST_ERROR; /* Create destination file */ if ((fid3 = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create object copy property list */ if ((pid = H5Pcreate(H5P_OBJECT_COPY)) < 0) - TEST_ERROR + TEST_ERROR; /* Set the "expand references" flag */ if (H5Pset_copy_object(pid, H5O_COPY_EXPAND_REFERENCE_FLAG) < 0) - TEST_ERROR + TEST_ERROR; /* Copy the middle file to the destination file. Note the expand references * flag *is* set, even though the references are now NULL. */ if (H5Ocopy(fid2, "/", fid3, "/AA", pid, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* Close datasets in middle file */ if (H5Dclose(did3) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did4) < 0) - TEST_ERROR + TEST_ERROR; /* Close the middle file */ if (H5Fclose(fid2) < 0) - TEST_ERROR + TEST_ERROR; /* Open copied datasets */ if ((did5 = H5Dopen2(fid3, "/AA/A/obj_ref_dset", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((did6 = H5Dopen2(fid3, "/AA/A/reg_ref_dset", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Read copied datasets */ if (H5Dread(did5, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, obj_buf) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dread(did6, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, reg_buf) < 0) - TEST_ERROR + TEST_ERROR; /* Verify that the references contain only "0" bytes */ if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)) != 0) - TEST_ERROR + TEST_ERROR; if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)) != 0) - TEST_ERROR + TEST_ERROR; /* Close */ if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(dcpl) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did5) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did6) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(fid3) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -12040,91 +12040,91 @@ test_copy_attr_crt_order(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d /* Create source file */ if ((fid1 = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create GCPL */ if ((gcplid = H5Pcreate(H5P_GROUP_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; /* Create group with creation order tracked */ if (H5Pset_attr_creation_order(gcplid, H5P_CRT_ORDER_TRACKED) < 0) - TEST_ERROR + TEST_ERROR; if ((gid1 = H5Gcreate2(fid1, NAME_GROUP_TOP, H5P_DEFAULT, gcplid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Add attributes to group */ if (test_copy_attach_attributes(gid1, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* Close group */ if (H5Gclose(gid1) < 0) - TEST_ERROR + TEST_ERROR; /* Create group with creation order tracked and indexed */ if (H5Pset_attr_creation_order(gcplid, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) - TEST_ERROR + TEST_ERROR; if ((gid1 = H5Gcreate2(fid1, NAME_GROUP_TOP2, H5P_DEFAULT, gcplid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Add attributes to group */ if (test_copy_attach_attributes(gid1, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* Close group */ if (H5Gclose(gid1) < 0) - TEST_ERROR + TEST_ERROR; /* Close GCPL */ if (H5Pclose(gcplid) < 0) - TEST_ERROR + TEST_ERROR; /* Create destination file */ if ((fid2 = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Copy the groups to the destination file */ if (H5Ocopy(fid1, NAME_GROUP_TOP, fid2, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Ocopy(fid1, NAME_GROUP_TOP2, fid2, NAME_GROUP_TOP2, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* Open groups with creation order tracked */ if ((gid1 = H5Gopen2(fid1, NAME_GROUP_TOP, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((gid2 = H5Gopen2(fid2, NAME_GROUP_TOP, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Compare the attributes */ if (compare_std_attributes(gid1, gid2, H5P_DEFAULT) != TRUE) - TEST_ERROR + TEST_ERROR; /* Close groups */ if (H5Gclose(gid1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(gid2) < 0) - TEST_ERROR + TEST_ERROR; /* Open groups with creation order tracked and indexed */ if ((gid1 = H5Gopen2(fid1, NAME_GROUP_TOP2, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((gid2 = H5Gopen2(fid2, NAME_GROUP_TOP2, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Compare the attributes */ if (compare_std_attributes(gid1, gid2, H5P_DEFAULT) != TRUE) - TEST_ERROR + TEST_ERROR; /* Close groups */ if (H5Gclose(gid1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(gid2) < 0) - TEST_ERROR + TEST_ERROR; /* Close */ if (H5Fclose(fid1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(fid2) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -12175,10 +12175,10 @@ test_copy_committed_datatype_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap int token_cmp; if (reopen) { - TESTING("H5Ocopy(): merging committed datatypes with reopen") + TESTING("H5Ocopy(): merging committed datatypes with reopen"); } /* end if */ else - TESTING("H5Ocopy(): merging committed datatypes") + TESTING("H5Ocopy(): merging committed datatypes"); /* set initial data values */ for (i = 0; i < DIM_SIZE_1; i++) @@ -12194,92 +12194,92 @@ test_copy_committed_datatype_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap /* create source files */ if ((fid_src1 = H5Fcreate(src1_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; if ((fid_src2 = H5Fcreate(src2_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim1d[0] = DIM_SIZE_1; /* create dataspace */ if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* * Populate source file 1 */ /* create datatype */ if ((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; /* committed datatype */ if ((H5Tcommit2(fid_src1, NAME_DATATYPE_SIMPLE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset at SRC file */ if ((did = H5Dcreate2(fid_src1, NAME_DATASET_SIMPLE, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file 1 */ if (H5Fclose(fid_src1) < 0) - TEST_ERROR + TEST_ERROR; /* * Populate source file 2 */ /* create datatype */ if ((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; /* committed datatype */ if ((H5Tcommit2(fid_src2, NAME_DATATYPE_SIMPLE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset at SRC file */ if ((did = H5Dcreate2(fid_src2, NAME_DATASET_SIMPLE, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file 1 */ if (H5Fclose(fid_src2) < 0) - TEST_ERROR + TEST_ERROR; /* open the source files with read-only */ if ((fid_src1 = H5Fopen(src1_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; if ((fid_src2 = H5Fopen(src2_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create ocpl and set merge named dtype flag */ if ((ocpypl_id = H5Pcreate(H5P_OBJECT_COPY)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_copy_object(ocpypl_id, H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG) < 0) - TEST_ERROR + TEST_ERROR; /* * First copy each entire file to the destination file (each with their own @@ -12287,85 +12287,85 @@ test_copy_committed_datatype_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap */ /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy SRC1 to DST */ if (H5Ocopy(fid_src1, "/", fid_dst, NAME_GROUP_TOP, ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* copy SRC2 to DST */ if (H5Ocopy(fid_src2, "/", fid_dst, NAME_GROUP_TOP2, ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (reopen) { /* Reopen file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDONLY, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* Open SRC1 committed dtype, get token */ if ((tid = H5Topen2(fid_dst, NAME_GROUP_TOP "/" NAME_DATATYPE_SIMPLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token)); if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* Open SRC1 dset dtype, check token */ if ((did = H5Dopen2(fid_dst, NAME_GROUP_TOP "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* Open SRC2 committed dtype, check token */ if ((tid = H5Topen2(fid_dst, NAME_GROUP_TOP2 "/" NAME_DATATYPE_SIMPLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* Open SRC2 dset dtype, check token */ if ((did = H5Dopen2(fid_dst, NAME_GROUP_TOP2 "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* Close destination file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* * Now copy only the datasets to the destination file, and verify the committed @@ -12373,75 +12373,75 @@ test_copy_committed_datatype_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap */ /* recreate destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* copy SRC1 to DST */ if (H5Ocopy(fid_src1, NAME_DATASET_SIMPLE, fid_dst, NAME_DATASET_SIMPLE, ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* copy SRC2 to DST */ if (H5Ocopy(fid_src2, NAME_DATASET_SIMPLE, fid_dst, NAME_DATASET_SIMPLE2, ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (reopen) { /* Reopen file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDONLY, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* Open SRC1 dset dtype, get token */ if ((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token)); if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* Open SRC2 dset dtype, check token */ if ((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE2, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* Close destination file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC files */ if (H5Fclose(fid_src1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(fid_src2) < 0) - TEST_ERROR + TEST_ERROR; /* close property list */ if (H5Pclose(ocpypl_id) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -12493,9 +12493,9 @@ test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, hbool_t reo int token_cmp; if (reopen) - TESTING("H5Ocopy(): merging committed datatypes to the source file with reopen") + TESTING("H5Ocopy(): merging committed datatypes to the source file with reopen"); else - TESTING("H5Ocopy(): merging committed datatypes to the source file") + TESTING("H5Ocopy(): merging committed datatypes to the source file"); /* set initial data values */ for (i = 0; i < DIM_SIZE_1; i++) @@ -12509,94 +12509,94 @@ test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, hbool_t reo /* create file */ if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim1d[0] = DIM_SIZE_1; /* create dataspace */ if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* * Populate first group */ /* Create group */ if ((gid = H5Gcreate2(fid, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create datatype */ if ((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; /* committed datatype */ if ((H5Tcommit2(fid, NAME_GROUP_TOP "/" NAME_DATATYPE_SIMPLE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset */ if ((did = H5Dcreate2(fid, NAME_GROUP_TOP "/" NAME_DATASET_SIMPLE, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the group */ if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* * Populate second group */ /* Create group */ if ((gid = H5Gcreate2(fid, NAME_GROUP_TOP2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create datatype */ if ((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; /* committed datatype */ if ((H5Tcommit2(fid, NAME_GROUP_TOP2 "/" NAME_DATATYPE_SIMPLE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset */ if ((did = H5Dcreate2(fid, NAME_GROUP_TOP2 "/" NAME_DATASET_SIMPLE, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the group */ if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* Create ocpl and set merge committed dtype flag */ if ((ocpypl_id = H5Pcreate(H5P_OBJECT_COPY)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_copy_object(ocpypl_id, H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG) < 0) - TEST_ERROR + TEST_ERROR; /* * First copy each group to the destination group 3 (each with their own @@ -12606,136 +12606,136 @@ test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, hbool_t reo */ /* Create destination group */ if ((gid = H5Gcreate2(fid, NAME_GROUP_TOP3, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* copy group 1 to DST */ if (H5Ocopy(fid, NAME_GROUP_TOP, fid, NAME_GROUP_TOP3 "/" NAME_GROUP_TOP, ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* copy group 2 to DST */ if (H5Ocopy(fid, NAME_GROUP_TOP2, fid, NAME_GROUP_TOP3 "/" NAME_GROUP_TOP2, ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (reopen) { /* Reopen file */ if (H5Fclose(fid) < 0) - TEST_ERROR + TEST_ERROR; if ((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* Open group 1 source committed dtype, get token */ if ((tid = H5Topen2(fid, NAME_GROUP_TOP "/" NAME_DATATYPE_SIMPLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token)); if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* Open group 1 source dset dtype, check token */ if ((did = H5Dopen2(fid, NAME_GROUP_TOP "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* Open group 1 committed dtype, check token */ if ((tid = H5Topen2(fid, NAME_GROUP_TOP3 "/" NAME_GROUP_TOP "/" NAME_DATATYPE_SIMPLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* Open group 1 dset dtype, check token */ if ((did = H5Dopen2(fid, NAME_GROUP_TOP3 "/" NAME_GROUP_TOP "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* Open group 2 source committed dtype, get token and make sure it is * different from group 1 source committed dtype */ if ((tid = H5Topen2(fid, NAME_GROUP_TOP2 "/" NAME_DATATYPE_SIMPLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (!token_cmp) - TEST_ERROR + TEST_ERROR; HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token)); if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* Open group 2 source dset dtype, check token */ if ((did = H5Dopen2(fid, NAME_GROUP_TOP2 "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* Open group 2 committed dtype, check token */ if ((tid = H5Topen2(fid, NAME_GROUP_TOP3 "/" NAME_GROUP_TOP2 "/" NAME_DATATYPE_SIMPLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* Open group 2 dset dtype, check token */ if ((did = H5Dopen2(fid, NAME_GROUP_TOP3 "/" NAME_GROUP_TOP2 "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* * Now copy only the datasets to the destination group, and verify the committed @@ -12743,102 +12743,102 @@ test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, hbool_t reo */ /* Create destination group */ if ((gid = H5Gcreate2(fid, NAME_GROUP_TOP4, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* copy SRC1 to DST */ if (H5Ocopy(fid, NAME_GROUP_TOP "/" NAME_DATASET_SIMPLE, fid, NAME_GROUP_TOP4 "/" NAME_DATASET_SIMPLE, ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* copy SRC2 to DST */ if (H5Ocopy(fid, NAME_GROUP_TOP2 "/" NAME_DATASET_SIMPLE, fid, NAME_GROUP_TOP4 "/" NAME_DATASET_SIMPLE2, ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (reopen) { /* Reopen file */ if (H5Fclose(fid) < 0) - TEST_ERROR + TEST_ERROR; if ((fid = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* Open group 1 source dset dtype, get token */ if ((did = H5Dopen2(fid, NAME_GROUP_TOP "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token)); if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* Open group 1 dset dtype, check token */ if ((did = H5Dopen2(fid, NAME_GROUP_TOP4 "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* Open group 2 source dset dtype, get token and make sure it is * different from group 1 source dset dtype */ if ((did = H5Dopen2(fid, NAME_GROUP_TOP2 "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (!token_cmp) - TEST_ERROR + TEST_ERROR; HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token)); if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* Open group 2 dset dtype, check token */ if ((did = H5Dopen2(fid, NAME_GROUP_TOP4 "/" NAME_DATASET_SIMPLE2, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* Close file */ if (H5Fclose(fid) < 0) - TEST_ERROR + TEST_ERROR; /* close property list */ if (H5Pclose(ocpypl_id) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -12890,9 +12890,9 @@ test_copy_committed_dt_merge_sugg(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl int token_cmp; if (reopen) - TESTING("H5Ocopy(): merging committed datatypes with suggestions and reopen") + TESTING("H5Ocopy(): merging committed datatypes with suggestions and reopen"); else - TESTING("H5Ocopy(): merging committed datatypes with suggestions") + TESTING("H5Ocopy(): merging committed datatypes with suggestions"); /* set initial data values */ for (i = 0; i < DIM_SIZE_1; i++) @@ -12907,90 +12907,90 @@ test_copy_committed_dt_merge_sugg(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim1d[0] = DIM_SIZE_1; /* create dataspace */ if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* * Populate source file */ /* create datatype */ if ((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; /* committed datatype */ if ((H5Tcommit2(fid_src, NAME_DATATYPE_SIMPLE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset at SRC file */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_SIMPLE, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* * Populate destination file */ /* create datatype */ if ((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; /* committed datatype "a" */ if ((H5Tcommit2(fid_dst, "/a", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* create datatype */ if ((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; /* committed datatype "b" */ if ((H5Tcommit2(fid_dst, "/b", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create ocpl and set merge committed dtype flag */ if ((ocpypl_id = H5Pcreate(H5P_OBJECT_COPY)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_copy_object(ocpypl_id, H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG) < 0) - TEST_ERROR + TEST_ERROR; /* * First copy dataset using "/b" as a suggestion, and verify that it uses @@ -12998,52 +12998,52 @@ test_copy_committed_dt_merge_sugg(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl */ /* Add datatype suggestion */ if (H5Padd_merge_committed_dtype_path(ocpypl_id, "/b") < 0) - TEST_ERROR + TEST_ERROR; /* open destination file */ if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* copy SRC dset to DST */ if (H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_dst, NAME_DATASET_SIMPLE, ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (reopen) { /* Reopen file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDONLY, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* Open committed dtype "b", get token */ if ((tid = H5Topen2(fid_dst, "/b", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token)); if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* Open dset dtype, check token */ if ((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* Close destination file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* * Now free suggestions, copy dataset without any suggestions, and verify @@ -13051,91 +13051,91 @@ test_copy_committed_dt_merge_sugg(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl */ /* Free suggestions */ if (H5Pfree_merge_committed_dtype_paths(ocpypl_id) < 0) - TEST_ERROR + TEST_ERROR; /* open destination file */ if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Delete destination dataset */ /* copy SRC dset to DST */ if (H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_dst, NAME_DATASET_SIMPLE2, ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (reopen) { /* Reopen file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDONLY, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* Open committed dtype "a", get token */ if ((tid = H5Topen2(fid_dst, "/a", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token)); if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* Open dset 2 dtype, check token */ if ((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE2, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* Open committed dtype "b", get token */ if ((tid = H5Topen2(fid_dst, "/b", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token)); if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* Open dset dtype, check token */ if ((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* Close destination file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close property list */ if (H5Pclose(ocpypl_id) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -13190,9 +13190,9 @@ test_copy_committed_dt_merge_attr(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl int token_cmp; if (reopen) - TESTING("H5Ocopy(): merging committed datatypes with attributes and reopen") + TESTING("H5Ocopy(): merging committed datatypes with attributes and reopen"); else - TESTING("H5Ocopy(): merging committed datatypes with attributes") + TESTING("H5Ocopy(): merging committed datatypes with attributes"); /* set initial data values */ for (i = 0; i < DIM_SIZE_1; i++) @@ -13207,98 +13207,98 @@ test_copy_committed_dt_merge_attr(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim1d[0] = DIM_SIZE_1; /* create dataspace */ if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* * Populate source file */ /* create datatype */ if ((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; /* committed datatype */ if ((H5Tcommit2(fid_src, NAME_DATATYPE_SIMPLE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset at SRC file */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_SIMPLE, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* * Populate destination file */ /* Create group */ if ((gid = H5Gcreate2(fid_dst, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create datatype */ if ((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; /* create anonymous committed datatype */ if ((H5Tcommit_anon(fid_dst, tid, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create attribute at SRC file */ if ((aid = H5Acreate2(gid, "attr", tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Awrite(aid, tid, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the attribute */ if (H5Aclose(aid) < 0) - TEST_ERROR + TEST_ERROR; /* close the group */ if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create ocpl and set merge committed dtype flag */ if ((ocpypl_id = H5Pcreate(H5P_OBJECT_COPY)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_copy_object(ocpypl_id, H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG) < 0) - TEST_ERROR + TEST_ERROR; /* * Copy dataset and verify that it uses the same committed datatype as the @@ -13306,64 +13306,64 @@ test_copy_committed_dt_merge_attr(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl */ /* open destination file */ if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* copy SRC dset to DST */ if (H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_dst, NAME_DATASET_SIMPLE, ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (reopen) { /* Reopen file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDONLY, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* Open attribute dtype, get token */ if ((aid = H5Aopen_by_name(fid_dst, NAME_GROUP_TOP, "attr", H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Aget_type(aid)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token)); if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(aid) < 0) - TEST_ERROR + TEST_ERROR; /* Open dset dtype, check token */ if ((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* Close destination file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close property list */ if (H5Pclose(ocpypl_id) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -13466,9 +13466,9 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d int token_cmp; if (reopen) - TESTING("H5Ocopy(): hier. of committed datatypes and merging with reopen") + TESTING("H5Ocopy(): hier. of committed datatypes and merging with reopen"); else - TESTING("H5Ocopy(): hier. of committed datatypes and merging ") + TESTING("H5Ocopy(): hier. of committed datatypes and merging "); /* set initial data values */ for (i = 0; i < DIM_SIZE_1; i++) @@ -13485,385 +13485,385 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d * Populate source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create and commit committed datatype (int) to root group */ if ((f_tid = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; if ((H5Tcommit2(fid_src, ROOT_NDT_INT, f_tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Create group /g0 */ if ((gid = H5Gcreate2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create and commit committed datatype (short) to group /g0 */ if ((g_tid = H5Tcopy(H5T_NATIVE_SHORT)) < 0) - TEST_ERROR + TEST_ERROR; if ((H5Tcommit2(gid, GROUP_NDT_SHORT, g_tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim1d[0] = DIM_SIZE_1; /* create dataspace */ if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset of native int in /g0 */ if ((did = H5Dcreate2(gid, SRC_DSET1, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data to dataset */ if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset of committed datatype (short) in /g0 */ if ((did = H5Dcreate2(gid, SRC_NDT_DSET2, g_tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data to dataset */ if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset of committed datatype (int) in /g0 */ if ((did = H5Dcreate2(gid, SRC_NDT_DSET3, f_tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data to dataset */ if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatypes */ if (H5Tclose(f_tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(g_tid) < 0) - TEST_ERROR + TEST_ERROR; /* close group */ if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* * Populate destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create group /uncopied */ if ((gid = H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create and commit anonymous datatype (short) to /uncopied */ if ((anon_tid = H5Tcopy(H5T_NATIVE_SHORT)) < 0) - TEST_ERROR + TEST_ERROR; if ((H5Tcommit_anon(gid, anon_tid, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create attribute of anon ndt (short) in /uncopied */ if ((aid = H5Acreate2(gid, DST_ATTR_ANON_SHORT, anon_tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close the attribute */ if (H5Aclose(aid) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatype */ if (H5Tclose(anon_tid) < 0) - TEST_ERROR + TEST_ERROR; /* create and commit anonymous datatype (int) to /uncopied */ if ((anon_tid = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; if ((H5Tcommit_anon(gid, anon_tid, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create attribute of anon ndt (int) in /uncopied */ if ((aid = H5Acreate2(gid, DST_ATTR_ANON_INT, anon_tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close the attribute */ if (H5Aclose(aid) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatype */ if (H5Tclose(anon_tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the group */ if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; if (reopen) { /* reopen file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create ocpl and set merge committed datatype flag */ if ((ocpypl_id = H5Pcreate(H5P_OBJECT_COPY)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_copy_object(ocpypl_id, H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG) < 0) - TEST_ERROR + TEST_ERROR; /* * Test 1 : copy / in SRC file to DST file */ if (H5Ocopy(fid_src, "/", fid_dst, SRC_ROOT_GROUP, ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* get token of committed datatype at root group */ if ((tid = H5Topen2(fid_dst, SRC_ROOT_GROUP "/" ROOT_NDT_INT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; HDmemcpy(&exp_token_int, &oinfo.token, sizeof(exp_token_int)); if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* get token of committed datatype at /g0 */ if ((tid = H5Topen2(fid_dst, SRC_ROOT_GROUP NAME_GROUP_TOP "/" GROUP_NDT_SHORT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; HDmemcpy(&exp_token_short, &oinfo.token, sizeof(exp_token_short)); if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* verify the datatype of first dataset is not committed */ if ((did = H5Dopen2(fid_dst, SRC_ROOT_GROUP NAME_GROUP_TOP "/" SRC_DSET1, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tcommitted(tid)) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* check token of datatype for second dataset */ if ((did = H5Dopen2(fid_dst, SRC_ROOT_GROUP NAME_GROUP_TOP "/" SRC_NDT_DSET2, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token_short, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* check token of datatype for third dataset */ if ((did = H5Dopen2(fid_dst, SRC_ROOT_GROUP NAME_GROUP_TOP "/" SRC_NDT_DSET3, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token_int, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* * Test 2: copy /g0 in SRC to DST */ if (H5Ocopy(fid_src, NAME_GROUP_TOP, fid_dst, NAME_GROUP_TOP, ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* get token of committed datatype at /g0 */ if ((tid = H5Topen2(fid_dst, NAME_GROUP_TOP "/" GROUP_NDT_SHORT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token_short, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* verify the datatype of first dataset is not committed */ if ((did = H5Dopen2(fid_dst, NAME_GROUP_TOP "/" SRC_DSET1, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tcommitted(tid)) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* check token of datatype for second dataset */ if ((did = H5Dopen2(fid_dst, NAME_GROUP_TOP "/" SRC_NDT_DSET2, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token_short, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* check token of datatype for third dataset */ if ((did = H5Dopen2(fid_dst, NAME_GROUP_TOP "/" SRC_NDT_DSET3, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token_int, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* * Test 3: copy datasets in /g0 at SRC to DST group /uncopied */ if (H5Ocopy(fid_src, NAME_GROUP_TOP "/" SRC_DSET1, fid_dst, NAME_GROUP_UNCOPIED "/" SRC_DSET1, ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Ocopy(fid_src, NAME_GROUP_TOP "/" SRC_NDT_DSET2, fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET2, ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Ocopy(fid_src, NAME_GROUP_TOP "/" SRC_NDT_DSET3, fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET3, ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* Open attribute with anon ndt (short), get token */ if ((aid = H5Aopen_by_name(fid_dst, NAME_GROUP_UNCOPIED, DST_ATTR_ANON_SHORT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Aget_type(aid)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token_short, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(aid) < 0) - TEST_ERROR + TEST_ERROR; /* Open attribute with anon ndt (int), get token */ if ((aid = H5Aopen_by_name(fid_dst, NAME_GROUP_UNCOPIED, DST_ATTR_ANON_INT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Aget_type(aid)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token_int, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(aid) < 0) - TEST_ERROR + TEST_ERROR; /* verify the datatype of first dataset is not committed */ if ((did = H5Dopen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_DSET1, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tcommitted(tid)) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* check token of datatype for second dataset */ if ((did = H5Dopen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET2, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token_short, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* check token of datatype for third dataset */ if ((did = H5Dopen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET3, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token_int, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* close property list */ if (H5Pclose(ocpypl_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -13933,9 +13933,9 @@ test_copy_cdt_merge_cdt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds int token_cmp; if (reopen) - TESTING("H5Ocopy(): merging various committed datatypes with reopen") + TESTING("H5Ocopy(): merging various committed datatypes with reopen"); else - TESTING("H5Ocopy(): merging various committed datatypes") + TESTING("H5Ocopy(): merging various committed datatypes"); /* Initialize the filenames */ h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename); @@ -13948,252 +13948,252 @@ test_copy_cdt_merge_cdt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds * Populate source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create committed datatype (short) */ if ((tid1 = H5Tcopy(H5T_NATIVE_SHORT)) < 0) - TEST_ERROR + TEST_ERROR; if ((H5Tcommit2(fid_src, SRC_NDT_SHORT, tid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create committed datatype (float) */ if ((tid2 = H5Tcopy(H5T_NATIVE_FLOAT)) < 0) - TEST_ERROR + TEST_ERROR; if ((H5Tcommit2(fid_src, SRC_NDT_FLOAT, tid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create committed datatype (int) */ if ((tid3 = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; if ((H5Tcommit2(fid_src, SRC_NDT_INT, tid3, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* set dataspace dimensions */ dim1d[0] = DIM_SIZE_1; /* create dataspace */ if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create an attribute of committed datatype (int); attach to committed datatype (int) */ if ((aid = H5Acreate2(tid3, SRC_ATTR, tid3, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(aid) < 0) - TEST_ERROR + TEST_ERROR; /* create committed datatype (double) */ if ((tid4 = H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) - TEST_ERROR + TEST_ERROR; if ((H5Tcommit2(fid_src, SRC_NDT_DOUBLE, tid4, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create an anonymous committed datatype (short) */ if ((tid5 = H5Tcopy(H5T_NATIVE_SHORT)) < 0) - TEST_ERROR + TEST_ERROR; if ((H5Tcommit_anon(fid_src, tid5, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create an attribute of anon ndt (short); attach to committed datatype (double) */ if ((aid = H5Acreate2(tid4, SRC_ATTR, tid5, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(aid) < 0) - TEST_ERROR + TEST_ERROR; /* close the committed datatypes */ if (H5Tclose(tid1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid3) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid4) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid5) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* * Populate destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create committed datatype (integer) */ if ((tid1 = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; if ((H5Tcommit2(fid_dst, DST_NDT_INT, tid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create committed datatype (float) */ if ((tid2 = H5Tcopy(H5T_NATIVE_FLOAT)) < 0) - TEST_ERROR + TEST_ERROR; if ((H5Tcommit2(fid_dst, DST_NDT_FLOAT, tid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create an attribute of native integer; attach to committed datatype (float) */ if ((aid = H5Acreate2(tid2, DST_ATTR, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(aid) < 0) - TEST_ERROR + TEST_ERROR; /* create committed datatype (double) */ if ((tid3 = H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) - TEST_ERROR + TEST_ERROR; if ((H5Tcommit2(fid_dst, DST_NDT_DOUBLE, tid3, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create anonymous committed datatype (short) */ if ((tid4 = H5Tcopy(H5T_NATIVE_SHORT)) < 0) - TEST_ERROR + TEST_ERROR; if ((H5Tcommit_anon(fid_dst, tid4, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create an attribute of anon ndt (short); attach to ndt (double) */ if ((aid = H5Acreate2(tid3, DST_ATTR, tid4, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(aid) < 0) - TEST_ERROR + TEST_ERROR; /* close the committed datatypes */ if (H5Tclose(tid1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid3) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid4) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; if (reopen) { /* Reopen file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create ocpl and set merge committed dtype flag */ if ((ocpypl_id = H5Pcreate(H5P_OBJECT_COPY)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_copy_object(ocpypl_id, H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG) < 0) - TEST_ERROR + TEST_ERROR; /* copy everything in SRC to DST */ if (H5Ocopy(fid_src, "/", fid_dst, SRC_ROOT_GROUP, ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* * Verification */ /* get token of committed datatype: /src_root/src_ndt_double */ if ((tid = H5Topen2(fid_dst, "/" SRC_ROOT_GROUP "/" SRC_NDT_DOUBLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token)); if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* get token of committed datatype: /dst_ndt_double */ if ((tid = H5Topen2(fid_dst, "/" DST_NDT_DOUBLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* get token of committed datatype: /src_root/src_ndt_float */ if ((tid = H5Topen2(fid_dst, "/" SRC_ROOT_GROUP "/" SRC_NDT_FLOAT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token)); if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* get token of committed datatype: /dst_ndt_float */ if ((tid = H5Topen2(fid_dst, "/" DST_NDT_FLOAT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* get token of committed datatype: /src_root/src_ndt_int */ if ((tid = H5Topen2(fid_dst, "/" SRC_ROOT_GROUP "/" SRC_NDT_INT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token)); if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* get token of committed datatype: /dst_ndt_int */ if ((tid = H5Topen2(fid_dst, "/" DST_NDT_INT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* get token of committed datatype: /src_root/src_ndt_short */ if ((tid = H5Topen2(fid_dst, "/" SRC_ROOT_GROUP "/" SRC_NDT_SHORT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token)); if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* open attribute; get its dtype; get dtype's token: /src_root/src_ndt_double/dst_attr */ if ((aid = H5Aopen_by_name(fid_dst, "/" SRC_ROOT_GROUP "/" SRC_NDT_DOUBLE, DST_ATTR, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Aget_type(aid)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(aid) < 0) - TEST_ERROR + TEST_ERROR; /* close the files */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* close the object copy property list */ if (H5Pclose(ocpypl_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -14243,9 +14243,9 @@ test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t int token_cmp; if (reopen) - TESTING("H5Ocopy(): merging committed datatypes with suggestions and reopen") + TESTING("H5Ocopy(): merging committed datatypes with suggestions and reopen"); else - TESTING("H5Ocopy(): merging committed datatypes with suggestions") + TESTING("H5Ocopy(): merging committed datatypes with suggestions"); /* Initialize the filenames */ h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename); @@ -14259,21 +14259,21 @@ test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t */ /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create committed datatype: "/src_ndt_int" */ if ((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; if ((H5Tcommit2(fid_src, SRC_NDT_INT, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* * Populate destination file @@ -14281,241 +14281,241 @@ test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create committed datatype: "/dst_ndt_int" */ if ((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; if ((H5Tcommit2(fid_dst, DST_NDT_INT, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* Create a group /uncopied */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* * Test 1 */ /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* open destination file */ if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create ocpl and set merge committed dtype flag */ if ((ocpypl_id = H5Pcreate(H5P_OBJECT_COPY)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_copy_object(ocpypl_id, H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG) < 0) - TEST_ERROR + TEST_ERROR; /* copy "/src_ndt_int" from SRC file to "/uncopied/src_ndt_int" at DST file */ if (H5Ocopy(fid_src, SRC_NDT_INT, fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_INT, ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (reopen) { /* Reopen file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDONLY, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* open committed dtype "/dst_ndt_int", get its token */ if ((tid = H5Topen2(fid_dst, DST_NDT_INT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token)); if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* check token of "/uncopied/src_ndt_int" */ if ((tid = H5Topen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_INT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* * Test 2 */ /* open destination file */ if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* add committed datatype search suggestion: "/uncopied/src_ndt_int" */ if (H5Padd_merge_committed_dtype_path(ocpypl_id, NAME_GROUP_UNCOPIED "/" SRC_NDT_INT) < 0) - TEST_ERROR + TEST_ERROR; /* copy "/src_ndt_int" from SRC file to "/src_ndt_int" at DST file */ if (H5Ocopy(fid_src, SRC_NDT_INT, fid_dst, SRC_NDT_INT, ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (reopen) { /* Reopen file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDONLY, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* open committed dtype "/uncopied/src_ndt_int", get its token */ if ((tid = H5Topen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_INT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token)); if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* check token of "/src_ndt_int" */ if ((tid = H5Topen2(fid_dst, SRC_NDT_INT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* * Test 3 */ /* open destination file */ if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* remove "/uncopied/src_ndt_int" from DST file */ if (H5Ldelete(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_INT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* copy "/src_ndt_int" from SRC file to "/uncopied/src_ndt_int" at DST file */ /* use default ocpypl_id -- without merging and suggestion */ if (H5Ocopy(fid_src, SRC_NDT_INT, fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_INT, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* copy "/src_ndt_int" from SRC file to "/src_ndt_int2" at DST file */ /* copy with merging and search suggestion: "/uncopied/src_ndt_int" */ if (H5Ocopy(fid_src, SRC_NDT_INT, fid_dst, SRC_NDT_INT2, ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (reopen) { /* Reopen file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDONLY, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* Open committed dtype "/uncopied/src_ndt_int", get its token */ if ((tid = H5Topen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_INT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token)); if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* check token of "/src_ndt_int2" */ if ((tid = H5Topen2(fid_dst, SRC_NDT_INT2, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* * Test 4 */ /* open destination file */ if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* add committed datatype search suggestion */ if (H5Padd_merge_committed_dtype_path(ocpypl_id, DST_NDT_INT) < 0) - TEST_ERROR + TEST_ERROR; /* copy "src_ndt_int" from SRC file to "/uncopied/src_ndt_int2" at DST file */ /* copy with merging and search suggestion: "/dst_ndt_int, /uncopied/src_ndt_int" */ if (H5Ocopy(fid_src, SRC_NDT_INT, fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_INT2, ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (reopen) { /* Reopen file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDONLY, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* Open committed dtype "/dst_dt_int", get its token */ if ((tid = H5Topen2(fid_dst, DST_NDT_INT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token)); if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* check token of "/uncopied/src_ndt_int2" */ if ((tid = H5Topen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_INT2, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close property list */ if (H5Pclose(ocpypl_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -14563,9 +14563,9 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h int token_cmp; if (reopen) - TESTING("H5Ocopy(): merging committed datatypes of datasets with suggestions and reopen") + TESTING("H5Ocopy(): merging committed datatypes of datasets with suggestions and reopen"); else - TESTING("H5Ocopy(): merging committed datatypes of datasets with suggestions") + TESTING("H5Ocopy(): merging committed datatypes of datasets with suggestions"); /* set initial data values */ for (i = 0; i < DIM_SIZE_1; i++) @@ -14583,313 +14583,313 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h */ /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create committed datatype: "/src_ndt_int" */ if ((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; if ((H5Tcommit2(fid_src, SRC_NDT_INT, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim1d[0] = DIM_SIZE_1; /* create dataspace */ if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset */ if ((did = H5Dcreate2(fid_src, SRC_NDT_DSET, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data to dataset */ if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* * Populate destination file */ /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create committed datatype: "/dst_ndt_int" */ if ((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; if ((H5Tcommit2(fid_dst, DST_NDT_INT, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Create a group "/uncopied" */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* * Test 1 */ /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* open destination file */ if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create ocpl and set merge committed dtype flag */ if ((ocpypl_id = H5Pcreate(H5P_OBJECT_COPY)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_copy_object(ocpypl_id, H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG) < 0) - TEST_ERROR + TEST_ERROR; /* copy "/src_ndt_dset" from SRC file to "/uncopied/src_ndt_dset" at DST file */ if (H5Ocopy(fid_src, SRC_NDT_DSET, fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET, ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (reopen) { /* Reopen file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDONLY, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* Open committed dtype "/dst_ndt_int", get its token */ if ((tid = H5Topen2(fid_dst, DST_NDT_INT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token)); if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* check token of datatype for the copied dataset: "/uncopied/src_ndt_dset" */ if ((did = H5Dopen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* * Test 2 */ /* open destination file */ if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* add committed datatype search suggestion: "/uncopied/src_ndt_dset" */ if (H5Padd_merge_committed_dtype_path(ocpypl_id, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET) < 0) - TEST_ERROR + TEST_ERROR; /* copy "/src_ndt_dset" from SRC file to "/src_ndt_dset" at DST file */ if (H5Ocopy(fid_src, SRC_NDT_DSET, fid_dst, SRC_NDT_DSET, ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (reopen) { /* Reopen file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDONLY, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* Open committed dtype dataset "/uncopied/src_ndt_dset", get its datatype token */ if ((did = H5Dopen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token)); if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* check token of datatype for the copied dataset: "/src_ndt_dset" */ if ((did = H5Dopen2(fid_dst, SRC_NDT_DSET, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* * Test 3 */ /* open destination file */ if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* remove "/uncopied/src_ndt_dset" */ if (H5Ldelete(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* copy "src_ndt_dset" from SRC file to "/uncopied/src_ndt_dset" at DST file */ /* use default ocpypl_id -- without merging and suggestion */ if (H5Ocopy(fid_src, SRC_NDT_DSET, fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* copy "src_ndt_dset" from SRC file to "/src_ndt_dset2" at DST file */ /* use merging and suggested searching path: "/uncopied/src_ndt_dset" */ if (H5Ocopy(fid_src, SRC_NDT_DSET, fid_dst, SRC_NDT_DSET2, ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (reopen) { /* Reopen file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDONLY, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* open the copied dataset: /uncopied/src_ndt_dset", get its token */ if ((did = H5Dopen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token)); if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* check token of datatype for the copied dataset: "/src_ndt_dset2" */ if ((did = H5Dopen2(fid_dst, SRC_NDT_DSET2, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* * Test 4 */ /* open destination file */ if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* add committed datatype search suggestion: "/src_ndt_dset" */ if (H5Padd_merge_committed_dtype_path(ocpypl_id, SRC_NDT_DSET) < 0) - TEST_ERROR + TEST_ERROR; /* copy /src_ndt_dset from SRC file to /uncopied/src_ndt_dset2 at DST */ /* use merging and suggested search paths: "/src_ndt_dset, /uncopied/src_ndt_dset" */ if (H5Ocopy(fid_src, SRC_NDT_DSET, fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET2, ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (reopen) { /* Reopen file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDONLY, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* open the copied dataset: "/src_ndt_dset", get its datatype token */ if ((did = H5Dopen2(fid_dst, SRC_NDT_DSET, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token)); if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* check token of datatype for the copied dataset: /uncopied/src_ndt_dset2 */ if ((did = H5Dopen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET2, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close property list */ if (H5Pclose(ocpypl_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -14938,9 +14938,9 @@ test_copy_cdt_merge_all_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hi char dst_filename[NAME_BUF_SIZE]; if (reopen) - TESTING("H5Ocopy(): merging different committed datatypes with suggestions and reopen") + TESTING("H5Ocopy(): merging different committed datatypes with suggestions and reopen"); else - TESTING("H5Ocopy(): merging different committed datatypes with suggestions") + TESTING("H5Ocopy(): merging different committed datatypes with suggestions"); /* Initialize the filenames */ h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename); @@ -14955,80 +14955,80 @@ test_copy_cdt_merge_all_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hi /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* set dataspace dimension, create dataspace */ dim1d[0] = DIM_SIZE_1; if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create a group */ if ((gid = H5Gcreate2(fid_src, SRC_GRP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create committed datatype in group */ if ((tid = H5Tcopy(H5T_NATIVE_SHORT)) < 0) - TEST_ERROR + TEST_ERROR; if ((H5Tcommit2(gid, SRC_NDT_SHORT, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create first dataset in group */ if ((did = H5Dcreate2(gid, SRC_NDT_DSET, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* closing */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* create committed datatype in group */ if ((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; if ((H5Tcommit2(gid, SRC_NDT_INT, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create second dataset in group */ if ((did = H5Dcreate2(gid, SRC_NDT_DSET2, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* closing */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* create third dataset in group */ if ((did = H5Dcreate2(gid, SRC_DSET, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* get datatype */ if ((tid_short = H5Topen2(fid_src, "/" SRC_GRP "/" SRC_NDT_SHORT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create an attribute attached to the dataset */ if ((aid = H5Acreate2(did, SRC_ATTR, tid_short, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* closing */ if (H5Aclose(aid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid_short) < 0) - TEST_ERROR + TEST_ERROR; /* close the group */ if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* * Populate DST file @@ -15036,484 +15036,484 @@ test_copy_cdt_merge_all_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hi /* create DST file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* set dataspace dimension, create dataspace */ dim1d[0] = DIM_SIZE_2; if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create committed datatype in root group */ if ((tid = H5Tcopy(H5T_NATIVE_SHORT)) < 0) - TEST_ERROR + TEST_ERROR; if ((H5Tcommit2(fid_dst, DST_NDT_SHORT, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* create committed datatype in root group */ if ((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; if ((H5Tcommit2(fid_dst, DST_NDT_INT, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create an attribute attached to committed datatype */ if ((aid = H5Acreate2(tid, DST_ATTR, tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* closing */ if (H5Aclose(aid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* create committed datatype in root group */ if ((tid = H5Tcopy(H5T_NATIVE_FLOAT)) < 0) - TEST_ERROR + TEST_ERROR; if ((H5Tcommit2(fid_dst, DST_NDT_FLOAT, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create an attribute attached to committed datatype */ if ((aid = H5Acreate2(tid, DST_ATTR, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(aid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* create a group */ if ((gid = H5Gcreate2(fid_dst, DST_GRP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create a committed datatype */ if ((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; if ((H5Tcommit2(gid, DST_NDT_INT, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create an attribute attached to committed datatype */ if ((aid = H5Acreate2(gid, DST_ATTR, tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* closing */ if (H5Aclose(aid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* create an attribute attached to group */ if ((aid = H5Acreate2(gid, DST_ATTR2, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* closing */ if (H5Aclose(aid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* create a group */ if ((gid = H5Gcreate2(fid_dst, DST_GRP2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create a committed datatype in group */ if ((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; if ((H5Tcommit2(gid, DST_NDT_INT, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create an attribute attached to group */ if ((aid = H5Acreate2(gid, DST_ATTR, tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* closing */ if (H5Aclose(aid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* create a committed datatype in group */ if ((tid = H5Tcopy(H5T_NATIVE_SHORT)) < 0) - TEST_ERROR + TEST_ERROR; if ((H5Tcommit2(gid, DST_NDT_SHORT, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* closing */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* create a committed datatype at root group */ if ((tid = H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) - TEST_ERROR + TEST_ERROR; if ((H5Tcommit2(fid_dst, DST_NDT_DOUBLE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* get datatype */ if ((tid_short = H5Topen2(fid_dst, "/" DST_GRP2 "/" DST_NDT_SHORT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create an attribute attached to committed datatype */ if ((aid = H5Acreate2(tid, DST_ATTR, tid_short, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* closing */ if (H5Aclose(aid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid_short) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* * Test 1 */ /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* open destination file */ if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create ocpl and set merge committed dtype flag */ if ((ocpypl_id = H5Pcreate(H5P_OBJECT_COPY)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_copy_object(ocpypl_id, H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG) < 0) - TEST_ERROR + TEST_ERROR; /* copy "/src_grp/src_ndt_dset2" from SRC file to DST file */ if (H5Ocopy(fid_src, "/" SRC_GRP "/" SRC_NDT_DSET2, fid_dst, "A_src_dset2", ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (reopen) { /* Reopen file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDONLY, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* get datatype for attribute attached to the group */ if ((aid = H5Aopen_by_name(fid_dst, DST_GRP, DST_ATTR, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((exp_tid = H5Aget_type(aid)) < 0) - TEST_ERROR + TEST_ERROR; /* open datatype of dataset */ if ((did = H5Dopen2(fid_dst, "A_src_dset2", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; /* should be the same */ if (!H5Tequal(exp_tid, tid)) - TEST_ERROR + TEST_ERROR; /* closing */ if (H5Tclose(exp_tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(aid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* * Test 2 */ if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* add committed datatype search suggestion */ if (H5Padd_merge_committed_dtype_path(ocpypl_id, "/" DST_GRP2) < 0) - TEST_ERROR + TEST_ERROR; /* copy "/src_grp/src_ndt_dset2" from SRC file to DST file */ if (H5Ocopy(fid_src, "/" SRC_GRP "/" SRC_NDT_DSET2, fid_dst, "B_src_dset2", ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (reopen) { /* Reopen file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDONLY, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* get datatype for attribute attached to the group */ if ((aid = H5Aopen_by_name(fid_dst, DST_GRP2, DST_ATTR, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((exp_tid = H5Aget_type(aid)) < 0) - TEST_ERROR + TEST_ERROR; /* open datatype of dataset */ if ((did = H5Dopen2(fid_dst, "B_src_dset2", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; /* should be the same */ if (!H5Tequal(exp_tid, tid)) - TEST_ERROR + TEST_ERROR; /* closing */ if (H5Tclose(exp_tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(aid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* * Test 3 */ if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* add another committed datatype search suggestion */ if (H5Padd_merge_committed_dtype_path(ocpypl_id, "/" DST_GRP "/" DST_NDT_INT) < 0) - TEST_ERROR + TEST_ERROR; /* copy "/src_grp/src_ndt_dset2" from SRC file to DST file */ if (H5Ocopy(fid_src, "/" SRC_GRP "/" SRC_NDT_DSET2, fid_dst, "C_src_dset2", ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (reopen) { /* Reopen file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDONLY, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* open committed dtype "/dst_grp/dst_dt_int", get its token */ if ((exp_tid = H5Topen2(fid_dst, "/" DST_GRP "/" DST_NDT_INT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open datatype of dataset */ if ((did = H5Dopen2(fid_dst, "C_src_dset2", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; /* should be the same */ if (!H5Tequal(exp_tid, tid)) - TEST_ERROR + TEST_ERROR; /* closing */ if (H5Tclose(exp_tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* * Test 4 */ if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* delete the group */ if (H5Ldelete(fid_dst, "/" DST_GRP, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* free the search suggestion paths */ if (H5Pfree_merge_committed_dtype_paths(ocpypl_id) < 0) - TEST_ERROR + TEST_ERROR; /* copy "/src_grp/src_ndt_dset2" from SRC file to DST file */ if (H5Ocopy(fid_src, "/" SRC_GRP "/" SRC_NDT_DSET2, fid_dst, "D_src_dset2", ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (reopen) { /* Reopen file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDONLY, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* open datatype of dataset */ if ((exp_did = H5Dopen2(fid_dst, "A_src_dset2", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((exp_tid = H5Dget_type(exp_did)) < 0) - TEST_ERROR + TEST_ERROR; /* Open datatype of dataset */ if ((did = H5Dopen2(fid_dst, "C_src_dset2", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; /* should be the same */ if (!H5Tequal(exp_tid, tid)) - TEST_ERROR + TEST_ERROR; /* closing */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* open datatype of dataset */ if ((did = H5Dopen2(fid_dst, "D_src_dset2", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; /* should be the same */ if (!H5Tequal(exp_tid, tid)) - TEST_ERROR + TEST_ERROR; /* closing */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* closing */ if (H5Tclose(exp_tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(exp_did) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* * Test 5 */ /* open destination file */ if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Add committed datatype search suggestion */ if (H5Padd_merge_committed_dtype_path(ocpypl_id, "/" DST_NDT_DOUBLE) < 0) - TEST_ERROR + TEST_ERROR; /* copy "/src_grp/src_ndt_dset" from SRC file to DST file */ if (H5Ocopy(fid_src, "/" SRC_GRP "/" SRC_NDT_DSET, fid_dst, "A_src_dset", ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (reopen) { /* Reopen file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDONLY, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* open attribute's dtype attached to committed datatype /dst_ndt_double */ if ((aid = H5Aopen_by_name(fid_dst, DST_NDT_DOUBLE, DST_ATTR, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((exp_tid = H5Aget_type(aid)) < 0) - TEST_ERROR + TEST_ERROR; /* Open datatype of dataset, check token */ if ((did = H5Dopen2(fid_dst, "A_src_dset", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; /* should be the same */ if (!H5Tequal(exp_tid, tid)) - TEST_ERROR + TEST_ERROR; /* closing */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; if (H5Aclose(aid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(exp_tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* * Test 6 */ /* open destination file */ if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Add committed datatype search suggestion */ if (H5Padd_merge_committed_dtype_path(ocpypl_id, "/" DST_NDT_SHORT) < 0) - TEST_ERROR + TEST_ERROR; /* copy "/src_grp/src_ndt_dset" from SRC file to DST file */ if (H5Ocopy(fid_src, "/" SRC_GRP "/" SRC_NDT_DSET, fid_dst, "B_src_dset", ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (reopen) { /* Reopen file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDONLY, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* open committed dtype "/dst_ndt_short" */ if ((exp_tid = H5Topen2(fid_dst, "/" DST_NDT_SHORT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* open datatype of dataset, check token */ if ((did = H5Dopen2(fid_dst, "B_src_dset", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; /* should be the same */ if (!H5Tequal(exp_tid, tid)) - TEST_ERROR + TEST_ERROR; /* closing */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; if (H5Tclose(exp_tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close property list */ if (H5Pclose(ocpypl_id) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -15584,9 +15584,9 @@ test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid int token_cmp; if (reopen) - TESTING("H5Ocopy(): H5Pset_mcdt_search_cb and reopen") + TESTING("H5Ocopy(): H5Pset_mcdt_search_cb and reopen"); else - TESTING("H5Ocopy(): H5Pset_mcdt_search_cb") + TESTING("H5Ocopy(): H5Pset_mcdt_search_cb"); /* set initial data values */ for (i = 0; i < DIM_SIZE_1; i++) @@ -15601,94 +15601,94 @@ test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim1d[0] = DIM_SIZE_1; /* create dataspace */ if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* * Populate source file */ /* create datatype */ if ((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; /* named datatype */ if ((H5Tcommit2(fid_src, NAME_DATATYPE_SIMPLE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset at SRC file */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_SIMPLE, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied group in destination file */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* * Populate destination file */ /* create datatype */ if ((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; /* committed datatype "a" */ if ((H5Tcommit2(fid_dst, "/a", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* create datatype */ if ((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; /* committed datatype "b" */ if ((H5Tcommit2(fid_dst, "/b", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create ocpl and set merge committed dtype flag */ if ((ocpypl_id = H5Pcreate(H5P_OBJECT_COPY)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_copy_object(ocpypl_id, H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG) < 0) - TEST_ERROR + TEST_ERROR; /* * First copy dataset using "/b" as a suggestion, and verify that it uses @@ -15696,52 +15696,52 @@ test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid */ /* Add datatype suggestion */ if (H5Padd_merge_committed_dtype_path(ocpypl_id, "/b") < 0) - TEST_ERROR + TEST_ERROR; /* open destination file */ if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* copy SRC dset to DST */ if (H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_dst, NAME_DATASET_SIMPLE, ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (reopen) { /* Reopen file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDONLY, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* Open committed dtype "b", get token */ if ((tid = H5Topen2(fid_dst, "/b", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token)); if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* Open dset dtype, check token */ if ((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* Close destination file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* * Set callback to continue the search @@ -15751,64 +15751,64 @@ test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid /* Free suggestions */ if (H5Pfree_merge_committed_dtype_paths(ocpypl_id) < 0) - TEST_ERROR + TEST_ERROR; /* Add datatype suggestion to group "/uncopied" */ if (H5Padd_merge_committed_dtype_path(ocpypl_id, NAME_GROUP_UNCOPIED) < 0) - TEST_ERROR + TEST_ERROR; /* Continue the global search */ if (H5Pset_mcdt_search_cb(ocpypl_id, mcdt_search_cb, &cb_udata) < 0) - TEST_ERROR + TEST_ERROR; /* open destination file */ if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* copy SRC dset to DST */ if (H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_dst, NAME_DATASET_SIMPLE2, ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* Verify callback has been called exactly once */ if (cb_udata.called != 1) - TEST_ERROR + TEST_ERROR; if (reopen) { /* Reopen file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDONLY, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* Open committed dtype "a", get token */ if ((tid = H5Topen2(fid_dst, "/a", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token)); if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* Open copied dataset and its dtype, check token */ if ((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE2, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* Close destination file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* * Stop the search, default action is to create an anonymous committed datatype @@ -15818,77 +15818,77 @@ test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid /* open destination file */ if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* copy SRC dset to DST */ if (H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_dst, NAME_DATASET_SIMPLE3, ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* Verify callback has been called exactly once */ if (cb_udata.called != 1) - TEST_ERROR + TEST_ERROR; if (reopen) { /* Reopen file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDONLY, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* Open committed dtype "a", get token */ if ((tid = H5Topen2(fid_dst, "/a", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token)); if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* Open the copied dataset and get its dtype, tokens should not be equal */ if ((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE3, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (!token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* Open committed dtype "b", get token */ if ((tid = H5Topen2(fid_dst, "/b", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token)); if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* Open the copied dataset and get its dtype, tokens should not be equal */ if ((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE3, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (!token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* Close destination file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* * Stop the search, default action is to create an anonymous committed datatype. @@ -15899,97 +15899,97 @@ test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid /* Free suggestions */ if (H5Pfree_merge_committed_dtype_paths(ocpypl_id) < 0) - TEST_ERROR + TEST_ERROR; /* open destination file */ if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Delete dataset */ if (H5Ldelete(fid_dst, NAME_DATASET_SIMPLE3, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* copy SRC dset to DST */ if (H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_dst, NAME_DATASET_SIMPLE3, ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* Verify callback has been called exactly once */ if (cb_udata.called != 1) - TEST_ERROR + TEST_ERROR; if (reopen) { /* Reopen file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDONLY, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* Open committed dtype "a", get token */ if ((tid = H5Topen2(fid_dst, "/a", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token)); if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* Open the copied dataset and get its dtype, tokens should not be equal */ if ((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE3, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (!token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* Open committed dtype "b", get token */ if ((tid = H5Topen2(fid_dst, "/b", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; HDmemcpy(&exp_token, &oinfo.token, sizeof(exp_token)); if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* Open the copied dataset and get its dtype, tokens should not be equal */ if ((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE3, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((tid = H5Dget_type(did)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Oget_info3(tid, &oinfo, H5O_INFO_BASIC) < 0) - TEST_ERROR + TEST_ERROR; if (H5Otoken_cmp(tid, &oinfo.token, &exp_token, &token_cmp) < 0) - TEST_ERROR + TEST_ERROR; if (!token_cmp) - TEST_ERROR + TEST_ERROR; if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* Close destination file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close property list */ if (H5Pclose(ocpypl_id) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -16059,9 +16059,9 @@ test_copy_set_get_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, H5O_mcdt_search_ret_t *mcdt_udata_p = NULL; /* Pointer to user data for callback */ if (reopen) - TESTING("H5Ocopy(): H5Pset/get_mcdt_search_cb and reopen") + TESTING("H5Ocopy(): H5Pset/get_mcdt_search_cb and reopen"); else - TESTING("H5Ocopy(): H5Pset/get_mcdt_search_cb") + TESTING("H5Ocopy(): H5Pset/get_mcdt_search_cb"); /* set initial data values */ for (i = 0; i < DIM_SIZE_1; i++) @@ -16076,94 +16076,94 @@ test_copy_set_get_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim1d[0] = DIM_SIZE_1; /* create dataspace */ if ((sid = H5Screate_simple(1, dim1d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* * Populate source file */ /* create datatype */ if ((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; /* committed datatype */ if ((H5Tcommit2(fid_src, NAME_DATATYPE_SIMPLE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create dataset at SRC file */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_SIMPLE, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data into file */ if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied group in destination file */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* * Populate destination file */ /* create datatype */ if ((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; /* committed datatype "a" */ if ((H5Tcommit2(fid_dst, "/a", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* create datatype */ if ((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; /* committed datatype "b" */ if ((H5Tcommit2(fid_dst, "/b", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create ocpl and set merge committed dtype flag */ if ((ocpypl_id = H5Pcreate(H5P_OBJECT_COPY)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_copy_object(ocpypl_id, H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG) < 0) - TEST_ERROR + TEST_ERROR; /* * First copy dataset using "/b" as a suggestion, and verify that it uses @@ -16171,36 +16171,36 @@ test_copy_set_get_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, */ /* Add datatype suggestion */ if (H5Padd_merge_committed_dtype_path(ocpypl_id, "/b") < 0) - TEST_ERROR + TEST_ERROR; /* open destination file */ if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* copy SRC dset to DST */ if (H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_dst, NAME_DATASET_SIMPLE, ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (reopen) { /* Reopen file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDONLY, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* Verify "get" routine functionality */ if (H5Pget_mcdt_search_cb(ocpypl_id, &mcdt_cb, (void **)&mcdt_udata_p) < 0) - TEST_ERROR + TEST_ERROR; if (mcdt_cb != NULL) - TEST_ERROR + TEST_ERROR; if (mcdt_udata_p != NULL) - TEST_ERROR + TEST_ERROR; /* Close destination file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* * Set callback to continue the search @@ -16209,30 +16209,30 @@ test_copy_set_get_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Free suggestions */ if (H5Pfree_merge_committed_dtype_paths(ocpypl_id) < 0) - TEST_ERROR + TEST_ERROR; /* Add datatype suggestion to group "/uncopied" */ if (H5Padd_merge_committed_dtype_path(ocpypl_id, NAME_GROUP_UNCOPIED) < 0) - TEST_ERROR + TEST_ERROR; /* Continue the global search */ if (H5Pset_mcdt_search_cb(ocpypl_id, mcdt_search_cbA, &mcdt_udataA) < 0) - TEST_ERROR + TEST_ERROR; /* open the destination file */ if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* copy SRC dset to DST */ if (H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_dst, NAME_DATASET_SIMPLE2, ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (reopen) { /* Reopen file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDONLY, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ mcdt_cb = NULL; @@ -16240,16 +16240,16 @@ test_copy_set_get_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Verify "get" routine functionality */ if (H5Pget_mcdt_search_cb(ocpypl_id, &mcdt_cb, (void **)&mcdt_udata_p) < 0) - TEST_ERROR + TEST_ERROR; if (mcdt_cb != mcdt_search_cbA) - TEST_ERROR + TEST_ERROR; if (mcdt_udata_p != &mcdt_udataA) - TEST_ERROR + TEST_ERROR; /* Close destination file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* * Stop the search, default action is to create an anonymous committed datatype @@ -16257,22 +16257,22 @@ test_copy_set_get_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, mcdt_udataB = H5O_MCDT_SEARCH_STOP; if (H5Pset_mcdt_search_cb(ocpypl_id, mcdt_search_cbA, &mcdt_udataB) < 0) - TEST_ERROR + TEST_ERROR; /* open destination file */ if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* copy SRC dset to DST */ if (H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_dst, NAME_DATASET_SIMPLE3, ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (reopen) { /* Reopen file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDONLY, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ mcdt_cb = NULL; @@ -16280,42 +16280,42 @@ test_copy_set_get_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Verify "get" routine functionality */ if (H5Pget_mcdt_search_cb(ocpypl_id, &mcdt_cb, (void **)&mcdt_udata_p) < 0) - TEST_ERROR + TEST_ERROR; if (mcdt_cb != mcdt_search_cbA) - TEST_ERROR + TEST_ERROR; if (mcdt_udata_p != &mcdt_udataB) - TEST_ERROR + TEST_ERROR; /* Close destination file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* Free suggestions */ if (H5Pfree_merge_committed_dtype_paths(ocpypl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_mcdt_search_cb(ocpypl_id, mcdt_search_cbB, &mcdt_udataB) < 0) - TEST_ERROR + TEST_ERROR; /* open destination file */ if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Delete dataset */ if (H5Ldelete(fid_dst, NAME_DATASET_SIMPLE3, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* copy SRC dset to DST */ if (H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_dst, NAME_DATASET_SIMPLE3, ocpypl_id, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (reopen) { /* Reopen file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; if ((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDONLY, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ mcdt_cb = NULL; @@ -16323,28 +16323,28 @@ test_copy_set_get_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Verify "get" routine functionality */ if (H5Pget_mcdt_search_cb(ocpypl_id, &mcdt_cb, (void **)&mcdt_udata_p) < 0) - TEST_ERROR + TEST_ERROR; if (mcdt_cb != mcdt_search_cbB) - TEST_ERROR + TEST_ERROR; if (mcdt_udata_p != &mcdt_udataB) - TEST_ERROR + TEST_ERROR; /* Close destination file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close property list */ if (H5Pclose(ocpypl_id) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -16384,7 +16384,7 @@ test_copy_iterate_cb(hid_t loc_id, const char *name, const H5L_info2_t H5_ATTR_U hid_t dst_loc_id = *((hid_t *)op_data); if (H5Ocopy(loc_id, name, dst_loc_id, name, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; return (H5_ITER_CONT); @@ -16413,46 +16413,46 @@ test_copy_iterate(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl /* Create source file */ if ((fid1 = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create groups */ for (i = 0; i < 9; i++) { HDsnprintf(grp_name, sizeof(grp_name), "grp%d", i); if ((gid = H5Gcreate2(fid1, grp_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; } /* end for */ /* Create destination file */ if ((fid2 = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Close files */ if (H5Fclose(fid1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(fid2) < 0) - TEST_ERROR + TEST_ERROR; /* Reopen files */ if ((fid1 = H5Fopen(src_filename, H5F_ACC_RDWR, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; if ((fid2 = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Iterate over links in the root group, copying each object */ if ((gid = H5Gopen2(fid1, "/", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Literate2(gid, H5_INDEX_NAME, H5_ITER_INC, NULL, test_copy_iterate_cb, &fid2) < 0) - TEST_ERROR + TEST_ERROR; /* Close */ if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(fid1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(fid2) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -16515,15 +16515,15 @@ test_copy_option(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create group at the SRC file */ if ((gid = H5Gcreate2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the group */ if (test_copy_attach_attributes(gid, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim2d[0] = DIM_SIZE_1; @@ -16531,80 +16531,80 @@ test_copy_option(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, /* create dataspace */ if ((sid = H5Screate_simple(2, dim2d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* add a dataset to the top group */ if ((did = H5Dcreate2(gid, NAME_DATASET_SIMPLE, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* create a sub-group */ if ((gid_sub = H5Gcreate2(fid_src, NAME_GROUP_SUB, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* add a dataset to the sub group */ if ((did = H5Dcreate2(gid_sub, NAME_DATASET_SIMPLE, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* create sub-sub-group */ if ((gid_sub_sub = H5Gcreate2(gid_sub, NAME_GROUP_SUB_SUB2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* add a dataset to the sub sub group */ if ((did = H5Dcreate2(gid_sub_sub, NAME_DATASET_SIMPLE, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* close dataset */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(gid_sub_sub) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(gid_sub) < 0) - TEST_ERROR + TEST_ERROR; /* close the group */ if (H5Gclose(gid) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; if ((flag & H5O_COPY_EXPAND_SOFT_LINK_FLAG) > 0) { /* Create group to copy */ if ((gid = H5Gcreate2(fid_src, NAME_GROUP_LINK, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; if (H5Lcreate_soft(NAME_DATASET_SUB_SUB, fid_src, NAME_LINK_SOFT, H5P_DEFAULT, H5P_DEFAULT) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; if (H5Lcreate_soft("nowhere", fid_src, NAME_LINK_SOFT_DANGLE, H5P_DEFAULT, H5P_DEFAULT) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; if (H5Gclose(gid) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Create group to compare with */ if ((gid = H5Gcreate2(fid_src, NAME_GROUP_LINK2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; if (H5Lcreate_hard(fid_src, NAME_DATASET_SUB_SUB, H5L_SAME_LOC, NAME_LINK_SOFT2, H5P_DEFAULT, H5P_DEFAULT) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; if (H5Lcreate_soft("nowhere", fid_src, NAME_LINK_SOFT_DANGLE2, H5P_DEFAULT, H5P_DEFAULT) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; if (H5Gclose(gid) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; } /* end if */ if ((flag & H5O_COPY_EXPAND_EXT_LINK_FLAG) > 0) { @@ -16614,220 +16614,220 @@ test_copy_option(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, /* Create the external file and dataset */ if ((fid_ext = H5Fcreate(ext_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; if ((sid = H5Screate_simple(2, dim2d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((did = H5Dcreate2(fid_ext, NAME_DATASET_SIMPLE, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; if (H5Fclose(fid_ext) < 0) - TEST_ERROR + TEST_ERROR; /* Create group to copy */ if (!(flag & H5O_COPY_EXPAND_SOFT_LINK_FLAG)) { if ((gid = H5Gcreate2(fid_src, NAME_GROUP_LINK, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ else if ((gid = H5Gopen2(fid_src, NAME_GROUP_LINK, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_external(ext_filename, NAME_DATASET_SIMPLE, fid_src, NAME_LINK_EXTERN, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_external("no_file", "no_object", fid_src, NAME_LINK_EXTERN_DANGLE, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* Create group to compare with */ if (!(flag & H5O_COPY_EXPAND_SOFT_LINK_FLAG)) { if ((gid = H5Gcreate2(fid_src, NAME_GROUP_LINK2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ else if ((gid = H5Gopen2(fid_src, NAME_GROUP_LINK2, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((did = H5Dcreate2(fid_src, NAME_LINK_EXTERN2, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; if (H5Lcreate_external("no_file", "no_object", fid_src, NAME_LINK_EXTERN_DANGLE2, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* Close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ if ((flag & H5O_COPY_EXPAND_REFERENCE_FLAG) > 0) { if ((gid_ref = H5Gcreate2(fid_src, NAME_GROUP_REF, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create an attribute of object references */ if (attach_ref_attr(fid_src, gid_ref) < 0) - TEST_ERROR + TEST_ERROR; /* create an attribute of region references */ if (attach_reg_ref_attr(fid_src, gid_ref) < 0) - TEST_ERROR + TEST_ERROR; /* create a dataset of region references */ if (create_reg_ref_dataset(fid_src, gid_ref) < 0) - TEST_ERROR + TEST_ERROR; /* Close group holding reference objects */ if (H5Gclose(gid_ref) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* open the source file with read-only */ /* (except when expanding soft links */ if ((flag & H5O_COPY_EXPAND_SOFT_LINK_FLAG) > 0) { if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDWR, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; } /* end if */ else if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create property to pass copy options */ if ((pid = H5Pcreate(H5P_OBJECT_COPY)) < 0) - TEST_ERROR + TEST_ERROR; /* set options for object copy */ if (H5Pset_copy_object(pid, flag) < 0) - TEST_ERROR + TEST_ERROR; /* Verify object copy flags */ if (H5Pget_copy_object(pid, &cpy_flags) < 0) - TEST_ERROR + TEST_ERROR; if (cpy_flags != flag) - TEST_ERROR + TEST_ERROR; /* copy the group from SRC to DST */ if (crt_intermediate_grp) { /* Create link creation plist to pass in intermediate group creation */ if ((lcpl_id = H5Pcreate(H5P_LINK_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_create_intermediate_group(lcpl_id, TRUE) < 0) - TEST_ERROR + TEST_ERROR; if (H5Ocopy(fid_src, NAME_GROUP_TOP, fid_dst, "/new_g0/new_g00", pid, lcpl_id) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(lcpl_id) < 0) - TEST_ERROR + TEST_ERROR; /* open the group for copy */ if ((gid = H5Gopen2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* open the destination group */ if ((gid2 = H5Gopen2(fid_dst, "/new_g0/new_g00", H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; } else if (((flag & H5O_COPY_EXPAND_SOFT_LINK_FLAG) > 0) || ((flag & H5O_COPY_EXPAND_EXT_LINK_FLAG) > 0)) { if (H5Ocopy(fid_src, NAME_GROUP_LINK, fid_dst, NAME_GROUP_LINK, pid, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if ((flag & H5O_COPY_EXPAND_SOFT_LINK_FLAG) > 0) /* Unlink dataset to copy from original location */ /* (So group comparison works properly) */ if (H5Ldelete(fid_src, NAME_DATASET_SUB_SUB, H5P_DEFAULT) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* open the group for copy */ if ((gid = H5Gopen2(fid_src, NAME_GROUP_LINK2, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* open the destination group */ if ((gid2 = H5Gopen2(fid_dst, NAME_GROUP_LINK, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; } else if (flag & (H5O_COPY_WITHOUT_ATTR_FLAG | H5O_COPY_PRESERVE_NULL_FLAG)) { if (H5Ocopy(fid_src, NAME_GROUP_TOP, fid_dst, NAME_GROUP_TOP, pid, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the group for copy */ if ((gid = H5Gopen2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* open the destination group */ if ((gid2 = H5Gopen2(fid_dst, NAME_GROUP_TOP, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; } else if (flag & H5O_COPY_SHALLOW_HIERARCHY_FLAG) { if (H5Ocopy(fid_src, NAME_GROUP_TOP, fid_dst, NAME_GROUP_TOP, pid, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the group for copy */ if ((gid = H5Gopen2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* open the destination group */ if ((gid2 = H5Gopen2(fid_dst, NAME_GROUP_TOP, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Set the copy depth */ depth = 1; } else if ((flag & H5O_COPY_EXPAND_REFERENCE_FLAG) > 0) { if (H5Ocopy(fid_src, NAME_GROUP_REF, fid_dst, NAME_GROUP_REF, pid, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the group for copy */ if ((gid = H5Gopen2(fid_src, NAME_GROUP_REF, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* open the destination group */ if ((gid2 = H5Gopen2(fid_dst, NAME_GROUP_REF, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; } else { /* Unknown flag */ - TEST_ERROR + TEST_ERROR; } /* end else */ /* Check if the groups are equal */ if (compare_groups(gid, gid2, pid, depth, flag) != TRUE) - TEST_ERROR + TEST_ERROR; if (H5Gclose(gid2) < 0) - TEST_ERROR + TEST_ERROR; if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; /* close properties */ if (H5Pclose(pid) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -16930,16 +16930,16 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst /* create source file */ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* create destination file */ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Create an uncopied object in destination file so that tokens in source and destination files aren't the * same */ if (H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Set dataspace dimensions */ dim2d[0] = DIM_SIZE_1; @@ -16947,35 +16947,35 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst /* create 2D dataspace */ if ((sid = H5Screate_simple(2, dim2d, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* create and set chunk plist */ if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_chunk(pid, 2, chunk_dim2d) < 0) - TEST_ERROR + TEST_ERROR; /* create 2D dataset in SRC file */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_SIMPLE, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* create 2D chunked dataset in SRC file */ if ((did2 = H5Dcreate2(fid_src, NAME_DATASET_CHUNKED, H5T_NATIVE_INT, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data to the dataset */ if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dwrite(did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the dataset */ if (test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; if (test_copy_attach_attributes(did2, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* * Test case 1 @@ -16986,134 +16986,134 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst */ /* copy the opened dataset to another location in SRC file */ if (H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_src, NAME_DATASET_SIMPLE2, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Ocopy(fid_src, NAME_DATASET_CHUNKED, fid_src, NAME_DATASET_CHUNKED2, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the copied dataset */ if ((did3 = H5Dopen2(fid_src, NAME_DATASET_SIMPLE2, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((did4 = H5Dopen2(fid_src, NAME_DATASET_CHUNKED2, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did3, H5P_DEFAULT, buf) != TRUE) - TEST_ERROR + TEST_ERROR; if (compare_datasets(did2, did4, H5P_DEFAULT, buf) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the copied dataset */ if (H5Dclose(did3) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did4) < 0) - TEST_ERROR + TEST_ERROR; /* * Copy to another file */ /* copy the opened dataset from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Ocopy(fid_src, NAME_DATASET_CHUNKED, fid_dst, NAME_DATASET_CHUNKED, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the copied dataset in DST file */ if ((did3 = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((did4 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did3, H5P_DEFAULT, buf) != TRUE) - TEST_ERROR + TEST_ERROR; if (compare_datasets(did2, did4, H5P_DEFAULT, buf) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the copied dataset in DST file */ if (H5Dclose(did3) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did4) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset in SRC file */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* * Test case 2 */ /* reopen the dataset in SRC file */ if ((did = H5Dopen2(fid_src, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((did2 = H5Dopen2(fid_src, NAME_DATASET_CHUNKED, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write another set of data to the dataset */ if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, newbuf) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dwrite(did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, newbuf) < 0) - TEST_ERROR + TEST_ERROR; /* * Copy within the same file */ /* copy the opened dataset to another location in SRC file */ if (H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_src, "NEW_DATASET_SIMPLE", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Ocopy(fid_src, NAME_DATASET_CHUNKED, fid_src, "NEW_DATASET_CHUNKED", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the copied dataset */ if ((did3 = H5Dopen2(fid_src, "NEW_DATASET_SIMPLE", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((did4 = H5Dopen2(fid_src, "NEW_DATASET_CHUNKED", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did3, H5P_DEFAULT, newbuf) != TRUE) - TEST_ERROR + TEST_ERROR; if (compare_datasets(did2, did4, H5P_DEFAULT, newbuf) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the copied dataset in SRC file */ if (H5Dclose(did3) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did4) < 0) - TEST_ERROR + TEST_ERROR; /* * Copy to another file */ /* copy the opened dataset from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_dst, "NEW_DATASET_SIMPLE", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; if (H5Ocopy(fid_src, NAME_DATASET_CHUNKED, fid_dst, "NEW_DATASET_CHUNKED", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the copied dataset in DST file */ if ((did3 = H5Dopen2(fid_dst, "NEW_DATASET_SIMPLE", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; if ((did4 = H5Dopen2(fid_dst, "NEW_DATASET_CHUNKED", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did3, H5P_DEFAULT, newbuf) != TRUE) - TEST_ERROR + TEST_ERROR; if (compare_datasets(did2, did4, H5P_DEFAULT, newbuf) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the copied dataset in DST file */ if (H5Dclose(did3) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did4) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset at SRC file */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* * Test case 3 @@ -17121,15 +17121,15 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst /* make a copy of the datatype */ if ((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) - TEST_ERROR + TEST_ERROR; /* commit the datatype */ if ((H5Tcommit2(fid_src, NAME_DATATYPE_SIMPLE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* close the datatype */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* open the committed datatype */ tid = H5Topen2(fid_src, NAME_DATATYPE_SIMPLE, H5P_DEFAULT); @@ -17137,11 +17137,11 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst /* create 2D dataset with the opened committed datatype in SRC file */ if ((did = H5Dcreate2(fid_src, NAME_DATASET_NAMED_DTYPE, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data to the dataset */ if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* * Copy within the same file @@ -17149,19 +17149,19 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst /* copy the opened dataset (with the opened committed datatype) to another location in SRC file */ if (H5Ocopy(fid_src, NAME_DATASET_NAMED_DTYPE, fid_src, NAME_DATASET_NAMED_DTYPE2, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the copied dataset */ if ((did2 = H5Dopen2(fid_src, NAME_DATASET_NAMED_DTYPE2, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the copied dataset in SRC file */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* * Copy to another file @@ -17169,104 +17169,104 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst /* copy the opened dataset (with the opened committed datatype) from SRC to DST */ if (H5Ocopy(fid_src, NAME_DATASET_NAMED_DTYPE, fid_dst, NAME_DATASET_NAMED_DTYPE2, H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the copied dataset in DST file */ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_NAMED_DTYPE2, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the datasets are equal */ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the copied dataset in DST file */ if (H5Dclose(did2) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset at SRC file */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close the committed datatype at SRC file */ if (H5Tclose(tid) < 0) - TEST_ERROR + TEST_ERROR; /* * Test case 4 */ /* create a group in SRC file */ if ((gid = H5Gcreate2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* attach attributes to the group */ if (test_copy_attach_attributes(gid, H5T_NATIVE_INT) < 0) - TEST_ERROR + TEST_ERROR; /* create 2D int dataset in the group at SRC file */ if ((did = H5Dcreate2(gid, NAME_DATASET_SIMPLE, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* write data to the dataset */ if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - TEST_ERROR + TEST_ERROR; /* * Copy within the same file */ /* copy the opened group (together with opened dataset) to another location in SRC file */ if (H5Ocopy(fid_src, NAME_GROUP_TOP, fid_src, "COPIED_GROUP", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the copied group at SRC */ if ((gid2 = H5Gopen2(fid_src, "COPIED_GROUP", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the groups are equal */ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the DST dataset */ if (H5Gclose(gid2) < 0) - TEST_ERROR + TEST_ERROR; /* * Copy to another file */ /* copy the opened group (together with opened dataset) to DST file */ if (H5Ocopy(fid_src, NAME_GROUP_TOP, fid_dst, "COPIED_GROUP", H5P_DEFAULT, H5P_DEFAULT) < 0) - TEST_ERROR + TEST_ERROR; /* open the copied group at DST */ if ((gid2 = H5Gopen2(fid_dst, "COPIED_GROUP", H5P_DEFAULT)) < 0) - TEST_ERROR + TEST_ERROR; /* Check if the groups are equal */ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE) - TEST_ERROR + TEST_ERROR; /* close the group in DST file */ if (H5Gclose(gid2) < 0) - TEST_ERROR + TEST_ERROR; /* close the group in SRC file */ if (H5Gclose(gid) < 0) - TEST_ERROR + TEST_ERROR; /* close the dataset in SRC file */ if (H5Dclose(did) < 0) - TEST_ERROR + TEST_ERROR; /* close dataspace */ if (H5Sclose(sid) < 0) - TEST_ERROR + TEST_ERROR; /* close the SRC file */ if (H5Fclose(fid_src) < 0) - TEST_ERROR + TEST_ERROR; /* close the DST file */ if (H5Fclose(fid_dst) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; @@ -17328,27 +17328,27 @@ main(void) /* Copy the file access property list */ if ((fapl2 = H5Pcopy(fapl)) < 0) - TEST_ERROR + TEST_ERROR; /* Set the "use the latest version of the format" bounds for creating objects in the file */ if (H5Pset_libver_bounds(fapl2, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) - TEST_ERROR + TEST_ERROR; /* Create an FCPL with sharing enabled */ if ((fcpl_shared = H5Pcreate(H5P_FILE_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_shared_mesg_nindexes(fcpl_shared, 1) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pset_shared_mesg_index(fcpl_shared, 0, H5O_SHMESG_ALL_FLAG, 10) < 0) - TEST_ERROR + TEST_ERROR; /* Obtain the default attribute storage phase change values */ if ((ocpl = H5Pcreate(H5P_OBJECT_CREATE)) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pget_attr_phase_change(ocpl, &max_compact, &min_dense) < 0) - TEST_ERROR + TEST_ERROR; if (H5Pclose(ocpl) < 0) - TEST_ERROR + TEST_ERROR; /* Test in all configurations */ for (configuration = 0; configuration <= MAX_CONFIGURATION; configuration++) { |