From 13bc2e73cf5f85b8bba2918e2e2b1af914e92e60 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Thu, 20 Oct 2011 12:13:11 -0500 Subject: [svn-r21618] Description: Bring r21617 from trunk to 1.8 branch: Recalculate the size of destination attribute message when the source and destination versions are different during an object copy operation. (Jira: HDFF-7718) Tested on: Mac OS X/32 10.7.2 (amazon) w/debug (h5committested on trunk) --- release_docs/RELEASE.txt | 3 + src/H5Aint.c | 4 + test/objcopy.c | 847 ++++++++++++++++++++++++----------------------- 3 files changed, 441 insertions(+), 413 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index edbd8b0..19d5f64 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -173,6 +173,9 @@ Bug Fixes since HDF5-1.8.7 Library ------- + - Correct error when copying attributes between files which are using + different versions of the file format. This addresses Jira issue #7718. + (QAK - 2011/10/20) - Corrected error when loading local heaps from the file, which could cause the size of the local heap's data block to increase dramatically. This addresses Jira issue #7767. (QAK - 2011/10/14) diff --git a/src/H5Aint.c b/src/H5Aint.c index 3f00c76..e04d080 100644 --- a/src/H5Aint.c +++ b/src/H5Aint.c @@ -1010,6 +1010,10 @@ H5A_attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_si if(H5A_set_version(file_dst, attr_dst) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, NULL, "unable to update attribute version") + /* Recompute the destination attribute's size, if it's a different version */ + if(attr_src->shared->version != attr_dst->shared->version) + *recompute_size = TRUE; + /* Set return value */ ret_value = attr_dst; diff --git a/test/objcopy.c b/test/objcopy.c index e87acf2..334f7e4 100755 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -55,9 +55,10 @@ const char *FILENAME[] = { */ #define CONFIG_SHARE_SRC 1 #define CONFIG_SHARE_DST 2 -#define CONFIG_NEW_FORMAT 4 -#define CONFIG_DENSE 8 -#define MAX_CONFIGURATION 15 +#define CONFIG_SRC_NEW_FORMAT 4 +#define CONFIG_DST_NEW_FORMAT 8 +#define CONFIG_DENSE 16 +#define MAX_CONFIGURATION 31 #define FILE_EXT "objcopy_ext.dat" /* The fill_old.h5 is generated from gen_old_fill.c in HDF5 'test' directory @@ -1480,7 +1481,7 @@ error: *------------------------------------------------------------------------- */ static int -test_copy_named_datatype(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) +test_copy_named_datatype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) { hid_t fid_src = -1, fid_dst = -1; /* File IDs */ hid_t tid = -1, tid2 = -1; /* Datatype IDs */ @@ -1490,14 +1491,14 @@ test_copy_named_datatype(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) TESTING("H5Ocopy(): named datatype"); /* Initialize the filenames */ - h5_fixname(FILENAME[0], fapl, src_filename, sizeof src_filename); - h5_fixname(FILENAME[1], fapl, dst_filename, sizeof dst_filename); + h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename); + h5_fixname(FILENAME[1], dst_fapl, dst_filename, sizeof dst_filename); /* Reset file address checking info */ addr_reset(); /* create source file */ - if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) TEST_ERROR /* create datatype */ if((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) TEST_ERROR @@ -1513,10 +1514,10 @@ test_copy_named_datatype(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) /* open the source file with read-only */ - if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR /* create destination file */ - if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR + if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) TEST_ERROR /* Create an uncopied object in destination file so that addresses 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 @@ -1573,7 +1574,7 @@ error: *------------------------------------------------------------------------- */ static int -test_copy_named_datatype_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) +test_copy_named_datatype_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) { hid_t fid_src = -1, fid_dst = -1; /* File IDs */ hid_t tid = -1, tid2 = -1; /* Datatype IDs */ @@ -1583,14 +1584,14 @@ test_copy_named_datatype_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) TESTING("H5Ocopy(): named vlen datatype"); /* Initialize the filenames */ - h5_fixname(FILENAME[0], fapl, src_filename, sizeof src_filename); - h5_fixname(FILENAME[1], fapl, dst_filename, sizeof dst_filename); + h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename); + h5_fixname(FILENAME[1], dst_fapl, dst_filename, sizeof dst_filename); /* Reset file address checking info */ addr_reset(); /* create source file */ - if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) TEST_ERROR /* create datatype */ if((tid = H5Tvlen_create(H5T_NATIVE_INT)) < 0) TEST_ERROR @@ -1606,10 +1607,10 @@ test_copy_named_datatype_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) /* open the source file with read-only */ - if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR /* create destination file */ - if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR + if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) TEST_ERROR /* Create an uncopied object in destination file so that addresses 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 @@ -1666,7 +1667,7 @@ error: *------------------------------------------------------------------------- */ static int -test_copy_named_datatype_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) +test_copy_named_datatype_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) { hid_t fid_src = -1, fid_dst = -1; /* File IDs */ hid_t tid = -1, tid2 = -1; /* Datatype IDs */ @@ -1676,14 +1677,14 @@ test_copy_named_datatype_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) TESTING("H5Ocopy(): named nested vlen datatype"); /* Initialize the filenames */ - h5_fixname(FILENAME[0], fapl, src_filename, sizeof src_filename); - h5_fixname(FILENAME[1], fapl, dst_filename, sizeof dst_filename); + h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename); + h5_fixname(FILENAME[1], dst_fapl, dst_filename, sizeof dst_filename); /* Reset file address checking info */ addr_reset(); /* create source file */ - if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) TEST_ERROR /* create first vlen datatype */ if((tid = H5Tvlen_create(H5T_NATIVE_INT)) < 0) TEST_ERROR @@ -1705,10 +1706,10 @@ test_copy_named_datatype_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) /* open the source file with read-only */ - if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR /* create destination file */ - if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR + if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) TEST_ERROR /* Create an uncopied object in destination file so that addresses 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 @@ -1769,7 +1770,7 @@ error: *------------------------------------------------------------------------- */ static int -test_copy_named_datatype_attr_self(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) +test_copy_named_datatype_attr_self(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) { hid_t fid_src = -1, fid_dst = -1; /* File IDs */ hid_t tid = -1, tid2 = -1; /* Datatype IDs */ @@ -1784,14 +1785,14 @@ test_copy_named_datatype_attr_self(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) TESTING("H5Ocopy(): named datatype with self-referential attribute"); /* Initialize the filenames */ - h5_fixname(FILENAME[0], fapl, src_filename, sizeof src_filename); - h5_fixname(FILENAME[1], fapl, dst_filename, sizeof dst_filename); + h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename); + h5_fixname(FILENAME[1], dst_fapl, dst_filename, sizeof dst_filename); /* Reset file address checking info */ addr_reset(); /* create source file */ - if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) TEST_ERROR /* create datatype */ if((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) TEST_ERROR @@ -1822,10 +1823,10 @@ test_copy_named_datatype_attr_self(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) /* open the source file with read-only */ - if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR /* create destination file */ - if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR + if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) TEST_ERROR /* Create an uncopied object in destination file so that addresses 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 @@ -1910,7 +1911,7 @@ error: *------------------------------------------------------------------------- */ static int -test_copy_dataset_simple(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) +test_copy_dataset_simple(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) { hid_t fid_src = -1, fid_dst = -1; /* File IDs */ hid_t sid = -1; /* Dataspace ID */ @@ -1929,14 +1930,14 @@ test_copy_dataset_simple(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) buf[i][j] = 10000 + 100*i+j; /* Initialize the filenames */ - h5_fixname(FILENAME[0], fapl, src_filename, sizeof src_filename); - h5_fixname(FILENAME[1], fapl, dst_filename, sizeof dst_filename); + h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename); + h5_fixname(FILENAME[1], dst_fapl, dst_filename, sizeof dst_filename); /* Reset file address checking info */ addr_reset(); /* create source file */ - if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) TEST_ERROR /* Set dataspace dimensions */ dim2d[0] = DIM_SIZE_1; @@ -1965,10 +1966,10 @@ test_copy_dataset_simple(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) /* open the source file with read-only */ - if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR /* create destination file */ - if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR + if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) TEST_ERROR /* Create an uncopied object in destination file so that addresses 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 @@ -2133,7 +2134,7 @@ error: *------------------------------------------------------------------------- */ static int -test_copy_dataset_simple_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) +test_copy_dataset_simple_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) { hid_t fid_src = -1, fid_dst = -1; /* File IDs */ hid_t sid = -1; /* Dataspace ID */ @@ -2145,14 +2146,14 @@ test_copy_dataset_simple_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) TESTING("H5Ocopy(): empty contiguous dataset"); /* Initialize the filenames */ - h5_fixname(FILENAME[0], fapl, src_filename, sizeof src_filename); - h5_fixname(FILENAME[1], fapl, dst_filename, sizeof dst_filename); + h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename); + h5_fixname(FILENAME[1], dst_fapl, dst_filename, sizeof dst_filename); /* Reset file address checking info */ addr_reset(); /* create source file */ - if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) TEST_ERROR /* Set dataspace dimensions */ dim2d[0] = DIM_SIZE_1; @@ -2178,10 +2179,10 @@ test_copy_dataset_simple_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) /* open the source file with read-only */ - if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR /* create destination file */ - if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR + if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) TEST_ERROR /* Create an uncopied object in destination file so that addresses 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 @@ -2241,7 +2242,7 @@ error: *------------------------------------------------------------------------- */ static int -test_copy_dataset_compound(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) +test_copy_dataset_compound(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) { hid_t fid_src = -1, fid_dst = -1; /* File IDs */ hid_t sid = -1; /* Dataspace ID */ @@ -2268,14 +2269,14 @@ test_copy_dataset_compound(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) } /* end for */ /* Initialize the filenames */ - h5_fixname(FILENAME[0], fapl, src_filename, sizeof src_filename); - h5_fixname(FILENAME[1], fapl, dst_filename, sizeof dst_filename); + h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename); + h5_fixname(FILENAME[1], dst_fapl, dst_filename, sizeof dst_filename); /* Reset file address checking info */ addr_reset(); /* create source file */ - if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) TEST_ERROR /* Set dataspace dimensions */ dim1d[0] = DIM_SIZE_1; @@ -2311,10 +2312,10 @@ test_copy_dataset_compound(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) /* open the source file with read-only */ - if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR /* create destination file */ - if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR + if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) TEST_ERROR /* Create an uncopied object in destination file so that addresses 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 @@ -2375,7 +2376,7 @@ error: *------------------------------------------------------------------------- */ static int -test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) +test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) { hid_t fid_src = -1, fid_dst = -1; /* File IDs */ hid_t sid = -1; /* Dataspace ID */ @@ -2402,14 +2403,14 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) } /* end for */ /* Initialize the filenames */ - h5_fixname(FILENAME[0], fapl, src_filename, sizeof src_filename); - h5_fixname(FILENAME[1], fapl, dst_filename, sizeof dst_filename); + h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename); + h5_fixname(FILENAME[1], dst_fapl, dst_filename, sizeof dst_filename); /* Reset file address checking info */ addr_reset(); /* create source file */ - if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) TEST_ERROR /* Set 1-D dataspace dimensions */ dim1d[0] = DIM_SIZE_1; @@ -2474,10 +2475,10 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) /* open the source file with read-only */ - if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR /* create destination file */ - if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR + if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) TEST_ERROR /* Create an uncopied object in destination file so that addresses 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 @@ -2553,7 +2554,7 @@ error: *------------------------------------------------------------------------- */ static int -test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) +test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) { hid_t fid_src = -1, fid_dst = -1; /* File IDs */ hid_t sid = -1; /* Dataspace ID */ @@ -2570,14 +2571,14 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) TESTING("H5Ocopy(): empty chunked dataset"); /* Initialize the filenames */ - h5_fixname(FILENAME[0], fapl, src_filename, sizeof src_filename); - h5_fixname(FILENAME[1], fapl, dst_filename, sizeof dst_filename); + h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename); + h5_fixname(FILENAME[1], dst_fapl, dst_filename, sizeof dst_filename); /* Reset file address checking info */ addr_reset(); /* create source file */ - if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) TEST_ERROR /* Set 1-D dataspace dimensions */ dim1d[0] = DIM_SIZE_1; @@ -2636,10 +2637,10 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) /* open the source file with read-only */ - if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR /* create destination file */ - if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR + if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) TEST_ERROR /* Create an uncopied object in destination file so that addresses 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 @@ -2715,7 +2716,7 @@ error: *------------------------------------------------------------------------- */ static int -test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) +test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) { hid_t fid_src = -1, fid_dst = -1; /* File IDs */ hid_t sid = -1; /* Dataspace ID */ @@ -2745,14 +2746,14 @@ test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) } /* end for */ /* Initialize the filenames */ - h5_fixname(FILENAME[0], fapl, src_filename, sizeof src_filename); - h5_fixname(FILENAME[1], fapl, dst_filename, sizeof dst_filename); + h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename); + h5_fixname(FILENAME[1], dst_fapl, dst_filename, sizeof dst_filename); /* Reset file address checking info */ addr_reset(); /* create source file */ - if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) TEST_ERROR /* Set 1-D dataspace dimensions */ dim1d[0]=DIM_SIZE_1; @@ -2832,10 +2833,10 @@ test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) /* open the source file with read-only */ - if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR /* create destination file */ - if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR + if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) TEST_ERROR /* Create an uncopied object in destination file so that addresses 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 @@ -2910,7 +2911,7 @@ error: *------------------------------------------------------------------------- */ static int -test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) +test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) { #ifdef H5_HAVE_FILTER_DEFLATE hid_t fid_src = -1, fid_dst = -1; /* File IDs */ @@ -2937,14 +2938,14 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) buf[i][j] = (float)(100.0); /* Something easy to compress */ /* Initialize the filenames */ - h5_fixname(FILENAME[0], fapl, src_filename, sizeof src_filename); - h5_fixname(FILENAME[1], fapl, dst_filename, sizeof dst_filename); + h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename); + h5_fixname(FILENAME[1], dst_fapl, dst_filename, sizeof dst_filename); /* Reset file address checking info */ addr_reset(); /* create source file */ - if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) TEST_ERROR /* Set dataspace dimensions */ dim2d[0]=DIM_SIZE_1; @@ -2981,10 +2982,10 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) /* open the source file with read-only */ - if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR /* create destination file */ - if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR + if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) TEST_ERROR /* Create an uncopied object in destination file so that addresses 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 @@ -3046,7 +3047,7 @@ error: *------------------------------------------------------------------------- */ static int -test_copy_dataset_compact(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) +test_copy_dataset_compact(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) { hid_t fid_src = -1, fid_dst = -1; /* File IDs */ hid_t sid = -1; /* Dataspace ID */ @@ -3066,14 +3067,14 @@ test_copy_dataset_compact(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) buf[i][j] = (float)(i+j/100.0); /* Initialize the filenames */ - h5_fixname(FILENAME[0], fapl, src_filename, sizeof src_filename); - h5_fixname(FILENAME[1], fapl, dst_filename, sizeof dst_filename); + h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename); + h5_fixname(FILENAME[1], dst_fapl, dst_filename, sizeof dst_filename); /* Reset file address checking info */ addr_reset(); /* create source file */ - if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) TEST_ERROR /* Set dataspace dimensions */ dim2d[0]=DIM_SIZE_1; @@ -3109,10 +3110,10 @@ test_copy_dataset_compact(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) /* open the source file with read-only */ - if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR /* create destination file */ - if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR + if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) TEST_ERROR /* Create an uncopied object in destination file so that addresses 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 @@ -3173,7 +3174,7 @@ error: *------------------------------------------------------------------------- */ static int -test_copy_dataset_external(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) +test_copy_dataset_external(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) { hid_t fid_src = -1, fid_dst = -1; /* File IDs */ hid_t sid = -1; /* Dataspace ID */ @@ -3196,14 +3197,14 @@ test_copy_dataset_external(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) HDfclose(HDfopen (FILE_EXT, "w")); /* Initialize the filenames */ - h5_fixname(FILENAME[0], fapl, src_filename, sizeof src_filename); - h5_fixname(FILENAME[1], fapl, dst_filename, sizeof dst_filename); + h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename); + h5_fixname(FILENAME[1], dst_fapl, dst_filename, sizeof dst_filename); /* Reset file address checking info */ addr_reset(); /* create source file */ - if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) TEST_ERROR /* Set dataspace dimensions */ dim1d[0]=DIM_SIZE_1; @@ -3236,10 +3237,10 @@ test_copy_dataset_external(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) /* open the source file with read-only */ - if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR /* create destination file */ - if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR + if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) TEST_ERROR /* Create an uncopied object in destination file so that addresses 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 @@ -3299,7 +3300,7 @@ error: *------------------------------------------------------------------------- */ static int -test_copy_dataset_named_dtype(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) +test_copy_dataset_named_dtype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) { hid_t fid_src = -1, fid_dst = -1; /* File IDs */ hid_t tid = -1; /* Datatype ID */ @@ -3318,14 +3319,14 @@ test_copy_dataset_named_dtype(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) buf[i] = i; /* Initialize the filenames */ - h5_fixname(FILENAME[0], fapl, src_filename, sizeof src_filename); - h5_fixname(FILENAME[1], fapl, dst_filename, sizeof dst_filename); + h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename); + h5_fixname(FILENAME[1], dst_fapl, dst_filename, sizeof dst_filename); /* Reset file address checking info */ addr_reset(); /* create source file */ - if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) TEST_ERROR /* Set dataspace dimensions */ dim1d[0]=DIM_SIZE_1; @@ -3357,10 +3358,10 @@ test_copy_dataset_named_dtype(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) /* open the source file with read-only */ - if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR /* create destination file */ - if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR + if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) TEST_ERROR /* Create an uncopied object in destination file so that addresses 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 @@ -3420,7 +3421,7 @@ error: *------------------------------------------------------------------------- */ static int -test_copy_dataset_named_dtype_hier(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) +test_copy_dataset_named_dtype_hier(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) { hid_t fid_src = -1, fid_dst = -1; /* File IDs */ hid_t tid = -1; /* Datatype ID */ @@ -3440,14 +3441,14 @@ test_copy_dataset_named_dtype_hier(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) buf[i] = i; /* Initialize the filenames */ - h5_fixname(FILENAME[0], fapl, src_filename, sizeof src_filename); - h5_fixname(FILENAME[1], fapl, dst_filename, sizeof dst_filename); + h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename); + h5_fixname(FILENAME[1], dst_fapl, dst_filename, sizeof dst_filename); /* Reset file address checking info */ addr_reset(); /* create source file */ - if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) 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 @@ -3494,10 +3495,10 @@ test_copy_dataset_named_dtype_hier(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) /* open the source file with read-only */ - if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR /* create destination file */ - if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR + if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) TEST_ERROR /* Create an uncopied object in destination file so that addresses 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 @@ -3559,7 +3560,7 @@ error: *------------------------------------------------------------------------- */ static int -test_copy_dataset_named_dtype_hier_outside(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) +test_copy_dataset_named_dtype_hier_outside(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) { hid_t fid_src = -1, fid_dst = -1; /* File IDs */ hid_t tid = -1; /* Datatype ID */ @@ -3579,14 +3580,14 @@ test_copy_dataset_named_dtype_hier_outside(hid_t fcpl_src, hid_t fcpl_dst, hid_t buf[i] = i; /* Initialize the filenames */ - h5_fixname(FILENAME[0], fapl, src_filename, sizeof src_filename); - h5_fixname(FILENAME[1], fapl, dst_filename, sizeof dst_filename); + h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename); + h5_fixname(FILENAME[1], dst_fapl, dst_filename, sizeof dst_filename); /* Reset file address checking info */ addr_reset(); /* create source file */ - if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) 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 @@ -3633,10 +3634,10 @@ test_copy_dataset_named_dtype_hier_outside(hid_t fcpl_src, hid_t fcpl_dst, hid_t /* open the source file with read-only */ - if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR /* create destination file */ - if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR + if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) TEST_ERROR /* Create an uncopied object in destination file so that addresses 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 @@ -3698,7 +3699,7 @@ error: *------------------------------------------------------------------------- */ static int -test_copy_dataset_multi_ohdr_chunks(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) +test_copy_dataset_multi_ohdr_chunks(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) { hid_t fid_src = -1, fid_dst = -1; /* File IDs */ hid_t sid = -1; /* Dataspace ID */ @@ -3717,14 +3718,14 @@ test_copy_dataset_multi_ohdr_chunks(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) buf[i] = i; /* Initialize the filenames */ - h5_fixname(FILENAME[0], fapl, src_filename, sizeof src_filename); - h5_fixname(FILENAME[1], fapl, dst_filename, sizeof dst_filename); + h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename); + h5_fixname(FILENAME[1], dst_fapl, dst_filename, sizeof dst_filename); /* Reset file address checking info */ addr_reset(); /* create source file */ - if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) 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 @@ -3767,10 +3768,10 @@ test_copy_dataset_multi_ohdr_chunks(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) /* open the source file with read-only */ - if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR /* create destination file */ - if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR + if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) TEST_ERROR /* Create an uncopied object in destination file so that addresses 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 @@ -3831,7 +3832,7 @@ error: *------------------------------------------------------------------------- */ static int -test_copy_dataset_attr_named_dtype(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) +test_copy_dataset_attr_named_dtype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) { hid_t fid_src = -1, fid_dst = -1; /* File IDs */ hid_t tid = -1; /* Datatype ID */ @@ -3851,14 +3852,14 @@ test_copy_dataset_attr_named_dtype(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) buf[i] = i; /* Initialize the filenames */ - h5_fixname(FILENAME[0], fapl, src_filename, sizeof src_filename); - h5_fixname(FILENAME[1], fapl, dst_filename, sizeof dst_filename); + h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename); + h5_fixname(FILENAME[1], dst_fapl, dst_filename, sizeof dst_filename); /* Reset file address checking info */ addr_reset(); /* create source file */ - if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) 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 @@ -3908,10 +3909,10 @@ test_copy_dataset_attr_named_dtype(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) /* open the source file with read-only */ - if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR /* create destination file */ - if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR + if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) TEST_ERROR /* Create an uncopied object in destination file so that addresses 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 @@ -3973,7 +3974,7 @@ error: *------------------------------------------------------------------------- */ static int -test_copy_dataset_contig_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) +test_copy_dataset_contig_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) { hid_t fid_src = -1, fid_dst = -1; /* File IDs */ hid_t tid = -1; /* Datatype ID */ @@ -3996,14 +3997,14 @@ test_copy_dataset_contig_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) } /* end for */ /* Initialize the filenames */ - h5_fixname(FILENAME[0], fapl, src_filename, sizeof src_filename); - h5_fixname(FILENAME[1], fapl, dst_filename, sizeof dst_filename); + h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename); + h5_fixname(FILENAME[1], dst_fapl, dst_filename, sizeof dst_filename); /* Reset file address checking info */ addr_reset(); /* create source file */ - if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) TEST_ERROR /* Set dataspace dimensions */ dim1d[0]=DIM_SIZE_1; @@ -4028,10 +4029,10 @@ test_copy_dataset_contig_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) /* open the source file with read-only */ - if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR /* create destination file */ - if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR + if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) TEST_ERROR /* Create an uncopied object in destination file so that addresses 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 @@ -4102,7 +4103,7 @@ error: *------------------------------------------------------------------------- */ static int -test_copy_dataset_chunked_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) +test_copy_dataset_chunked_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) { hid_t fid_src = -1, fid_dst = -1; /* File IDs */ hid_t tid = -1; /* Datatype ID */ @@ -4127,14 +4128,14 @@ test_copy_dataset_chunked_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) } /* end for */ /* Initialize the filenames */ - h5_fixname(FILENAME[0], fapl, src_filename, sizeof src_filename); - h5_fixname(FILENAME[1], fapl, dst_filename, sizeof dst_filename); + h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename); + h5_fixname(FILENAME[1], dst_fapl, dst_filename, sizeof dst_filename); /* Reset file address checking info */ addr_reset(); /* create source file */ - if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) TEST_ERROR /* Set dataspace dimensions */ dim1d[0]=DIM_SIZE_1; @@ -4166,10 +4167,10 @@ test_copy_dataset_chunked_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) /* open the source file with read-only */ - if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR /* create destination file */ - if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR + if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) TEST_ERROR /* Create an uncopied object in destination file so that addresses 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 @@ -4240,7 +4241,7 @@ error: *------------------------------------------------------------------------- */ static int -test_copy_dataset_compact_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) +test_copy_dataset_compact_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) { hid_t fid_src = -1, fid_dst = -1; /* File IDs */ hid_t tid = -1; /* Datatype ID */ @@ -4264,14 +4265,14 @@ test_copy_dataset_compact_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) } /* end for */ /* Initialize the filenames */ - h5_fixname(FILENAME[0], fapl, src_filename, sizeof src_filename); - h5_fixname(FILENAME[1], fapl, dst_filename, sizeof dst_filename); + h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename); + h5_fixname(FILENAME[1], dst_fapl, dst_filename, sizeof dst_filename); /* Reset file address checking info */ addr_reset(); /* create source file */ - if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) TEST_ERROR /* Set dataspace dimensions */ dim1d[0]=DIM_SIZE_1; @@ -4303,10 +4304,10 @@ test_copy_dataset_compact_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) /* open the source file with read-only */ - if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR /* create destination file */ - if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR + if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) TEST_ERROR /* Create an uncopied object in destination file so that addresses 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 @@ -4377,7 +4378,7 @@ error: *------------------------------------------------------------------------- */ static int -test_copy_attribute_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) +test_copy_attribute_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) { hid_t fid_src = -1, fid_dst = -1; /* File IDs */ hid_t sid = -1; /* Dataspace ID */ @@ -4390,14 +4391,14 @@ test_copy_attribute_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) TESTING("H5Ocopy(): variable length attribute"); /* Initialize the filenames */ - h5_fixname(FILENAME[0], fapl, src_filename, sizeof src_filename); - h5_fixname(FILENAME[1], fapl, dst_filename, sizeof dst_filename); + h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename); + h5_fixname(FILENAME[1], dst_fapl, dst_filename, sizeof dst_filename); /* Reset file address checking info */ addr_reset(); /* create source file */ - if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) TEST_ERROR /* Set dataspace dimensions */ dim2d[0] = DIM_SIZE_1; @@ -4423,10 +4424,10 @@ test_copy_attribute_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) /* open the source file with read-only */ - if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR /* create destination file */ - if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR + if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) TEST_ERROR /* Create an uncopied object in destination file so that addresses 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 @@ -4492,7 +4493,7 @@ error: *------------------------------------------------------------------------- */ static int -test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) +test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) { #ifdef H5_HAVE_FILTER_DEFLATE hid_t fid_src = -1, fid_dst = -1; /* File IDs */ @@ -4525,14 +4526,14 @@ test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) } /* Initialize the filenames */ - h5_fixname(FILENAME[0], fapl, src_filename, sizeof src_filename); - h5_fixname(FILENAME[1], fapl, dst_filename, sizeof dst_filename); + h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename); + h5_fixname(FILENAME[1], dst_fapl, dst_filename, sizeof dst_filename); /* Reset file address checking info */ addr_reset(); /* create source file */ - if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) TEST_ERROR /* Set dataspace dimensions */ dim2d[0]=DIM_SIZE_1; @@ -4566,10 +4567,10 @@ test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) /* open the source file with read-only */ - if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR /* create destination file */ - if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR + if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) TEST_ERROR /* Create an uncopied object in destination file so that addresses 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 @@ -4644,7 +4645,7 @@ error: *------------------------------------------------------------------------- */ static int -test_copy_group_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) +test_copy_group_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) { hid_t fid_src = -1, fid_dst = -1; /* File IDs */ hid_t gid = -1, gid2 = -1; /* Group IDs */ @@ -4654,14 +4655,14 @@ test_copy_group_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) TESTING("H5Ocopy(): empty group"); /* Initialize the filenames */ - h5_fixname(FILENAME[0], fapl, src_filename, sizeof src_filename); - h5_fixname(FILENAME[1], fapl, dst_filename, sizeof dst_filename); + h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename); + h5_fixname(FILENAME[1], dst_fapl, dst_filename, sizeof dst_filename); /* Reset file address checking info */ addr_reset(); /* create source file */ - if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) 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 @@ -4677,10 +4678,10 @@ test_copy_group_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) /* open the source file with read-only */ - if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR /* create destination file */ - if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR + if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) TEST_ERROR /* Create an uncopied object in destination file so that addresses 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 @@ -4724,22 +4725,22 @@ error: /*------------------------------------------------------------------------- - * Function: test_copy_group + * Function: test_copy_root_group * - * Purpose: Create a group in SRC file and copy it to DST file + * Purpose: Create a root group in SRC file and copy it to DST file * * Return: Success: 0 * Failure: number of errors * * Programmer: Peter Cao - * Friday, September 30, 2005 + * August 8, 2006 * * Modifications: * *------------------------------------------------------------------------- */ static int -test_copy_group(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) +test_copy_root_group(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl) { hid_t fid_src = -1, fid_dst = -1; /* File IDs */ hid_t sid = -1; /* Dataspace ID */ @@ -4752,7 +4753,7 @@ test_copy_group(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) char src_filename[NAME_BUF_SIZE]; char dst_filename[NAME_BUF_SIZE]; - TESTING("H5Ocopy(): simple nested groups"); + TESTING("H5Ocopy(): root group"); /* set initial data values */ for (i=0; i 0) { char ext_filename[NAME_BUF_SIZE]; - h5_fixname(FILENAME[2], fapl, ext_filename, sizeof ext_filename); + h5_fixname(FILENAME[2], src_fapl, ext_filename, sizeof ext_filename); /* Create the external file and dataset */ - if((fid_ext = H5Fcreate(ext_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR + if((fid_ext = H5Fcreate(ext_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) TEST_ERROR if((sid = H5Screate_simple(2, dim2d, NULL)) < 0) TEST_ERROR if((did = H5Dcreate2(fid_ext, NAME_DATASET_SIMPLE, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR if(H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) TEST_ERROR @@ -8272,13 +8274,13 @@ test_copy_option(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl, unsigned flag, hboo /* 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, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fopen(src_filename, H5F_ACC_RDWR, src_fapl)) < 0) TEST_ERROR } /* end if */ else - if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR + if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR /* create destination file */ - if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR + if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) TEST_ERROR /* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */ @@ -8446,12 +8448,13 @@ main(void) /* Test in all configurations */ for(configuration = 0; configuration <= MAX_CONFIGURATION; configuration++) { - hid_t my_fapl; + hid_t src_fapl; + hid_t dst_fapl; hid_t fcpl_src; hid_t fcpl_dst; /* No need to test dense attributes with old format */ - if(!(configuration & CONFIG_NEW_FORMAT) && (configuration & CONFIG_DENSE)) + if(!(configuration & CONFIG_SRC_NEW_FORMAT) && (configuration & CONFIG_DENSE)) continue; /* Test with and without shared messages */ @@ -8472,12 +8475,12 @@ main(void) fcpl_dst = H5P_DEFAULT; } - /* Set the FAPL for the type of format */ - if(configuration & CONFIG_NEW_FORMAT) { - puts("Testing with new group format:"); - my_fapl = fapl2; + /* Set the FAPL for the source file's type of format */ + if(configuration & CONFIG_SRC_NEW_FORMAT) { + puts("Testing with latest format for source file:"); + src_fapl = fapl2; - /* Test with and without dense attributes */ + /* Test with and without dense attributes */ if(configuration & CONFIG_DENSE) { puts("Testing with dense attributes:"); num_attributes_g = max_compact + 1; @@ -8488,95 +8491,113 @@ main(void) } } /* end if */ else { - puts("Testing with old group format:"); - my_fapl = fapl; + puts("Testing with oldest file format for source file:"); + src_fapl = fapl; num_attributes_g = 4; } /* end else */ + /* Set the FAPL for the destination file's type of format */ + if(configuration & CONFIG_DST_NEW_FORMAT) { + puts("Testing with latest format for destination file:"); + dst_fapl = fapl2; + } /* end if */ + else { + puts("Testing with oldest file format for destination file:"); + dst_fapl = fapl; + } /* end else */ + /* The tests... */ - nerrors += test_copy_named_datatype_attr_self(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_dataset_simple(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_dataset_simple_samefile(fcpl_src, my_fapl); - nerrors += test_copy_dataset_simple_empty(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_dataset_compound(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_dataset_chunked(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_dataset_chunked_empty(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_dataset_chunked_sparse(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_dataset_compressed(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_dataset_compact(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_dataset_multi_ohdr_chunks(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_dataset_attr_named_dtype(fcpl_src, fcpl_dst, my_fapl); - - nerrors += test_copy_group_empty(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_root_group(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_group(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_group_deep(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_group_loop(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_group_wide_loop(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_group_links(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_soft_link(fcpl_src, fcpl_dst, my_fapl); + nerrors += test_copy_named_datatype_attr_self(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_dataset_simple(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_dataset_simple_samefile(fcpl_src, src_fapl); + nerrors += test_copy_dataset_simple_empty(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_dataset_compound(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_dataset_chunked(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_dataset_chunked_empty(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_dataset_chunked_sparse(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_dataset_compressed(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_dataset_compact(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_dataset_multi_ohdr_chunks(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_dataset_attr_named_dtype(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + + nerrors += test_copy_group_empty(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_root_group(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_group(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_group_deep(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_group_loop(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_group_wide_loop(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_group_links(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_soft_link(fcpl_src, fcpl_dst, src_fapl, dst_fapl); #ifndef H5_CANNOT_OPEN_TWICE - nerrors += test_copy_ext_link(fcpl_src, fcpl_dst, my_fapl); + nerrors += test_copy_ext_link(fcpl_src, fcpl_dst, src_fapl, dst_fapl); #endif /* H5_CANNOT_OPEN_TWICE */ - nerrors += test_copy_exist(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_path(fcpl_src, fcpl_dst, my_fapl); - - nerrors += test_copy_option(fcpl_src, fcpl_dst, my_fapl, H5O_COPY_WITHOUT_ATTR_FLAG, - FALSE, "H5Ocopy(): without attributes"); - nerrors += test_copy_option(fcpl_src, fcpl_dst, my_fapl, 0, TRUE, - "H5Ocopy(): with missing groups"); - nerrors += test_copy_option(fcpl_src, fcpl_dst, my_fapl, H5O_COPY_EXPAND_SOFT_LINK_FLAG, - FALSE, "H5Ocopy(): expand soft link"); - nerrors += test_copy_option(fcpl_src, fcpl_dst, my_fapl, H5O_COPY_EXPAND_EXT_LINK_FLAG, + nerrors += test_copy_exist(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_path(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + + nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, + H5O_COPY_WITHOUT_ATTR_FLAG, + FALSE, "H5Ocopy(): without attributes"); + nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, + 0, + TRUE, "H5Ocopy(): with missing groups"); + nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, + H5O_COPY_EXPAND_SOFT_LINK_FLAG, + FALSE, "H5Ocopy(): expand soft link"); + nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, + H5O_COPY_EXPAND_EXT_LINK_FLAG, FALSE, "H5Ocopy: expand external link"); - nerrors += test_copy_option(fcpl_src, fcpl_dst, my_fapl, + nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, H5O_COPY_EXPAND_SOFT_LINK_FLAG | H5O_COPY_EXPAND_EXT_LINK_FLAG, FALSE, "H5Ocopy: expand soft and external links"); - nerrors += test_copy_option(fcpl_src, fcpl_dst, my_fapl, H5O_COPY_SHALLOW_HIERARCHY_FLAG, - FALSE, "H5Ocopy(): shallow group copy"); - nerrors += test_copy_option(fcpl_src, fcpl_dst, my_fapl, H5O_COPY_EXPAND_REFERENCE_FLAG, - FALSE, "H5Ocopy(): expand object reference"); - nerrors += test_copy_option(fcpl_src, fcpl_dst, my_fapl, H5O_COPY_PRESERVE_NULL_FLAG, - FALSE, "H5Ocopy(): preserve NULL messages"); - nerrors += test_copy_option(fcpl_src, fcpl_dst, my_fapl, H5O_COPY_WITHOUT_ATTR_FLAG | - H5O_COPY_PRESERVE_NULL_FLAG, TRUE, "H5Ocopy(): preserve NULL messages"); + nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, + H5O_COPY_SHALLOW_HIERARCHY_FLAG, + FALSE, "H5Ocopy(): shallow group copy"); + nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, + H5O_COPY_EXPAND_REFERENCE_FLAG, + FALSE, "H5Ocopy(): expand object reference"); + nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, + H5O_COPY_PRESERVE_NULL_FLAG, + FALSE, "H5Ocopy(): preserve NULL messages"); + nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, + H5O_COPY_WITHOUT_ATTR_FLAG | H5O_COPY_PRESERVE_NULL_FLAG, + TRUE, "H5Ocopy(): preserve NULL messages"); /* Tests that do not use attributes and do not need to be tested * multiple times for different attribute configurations */ if(configuration < CONFIG_DENSE) { - nerrors += test_copy_named_datatype(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_named_datatype_vl(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_named_datatype_vl_vl(fcpl_src, fcpl_dst, my_fapl); - - nerrors += test_copy_dataset_external(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_dataset_named_dtype(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_dataset_named_dtype_hier(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_dataset_named_dtype_hier_outside(fcpl_src, fcpl_dst, my_fapl); - - nerrors += test_copy_dataset_contig_vl(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_dataset_chunked_vl(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_dataset_compact_vl(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_dataset_compressed_vl(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_attribute_vl(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_dataset_compact_named_vl(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_dataset_contig_named_vl(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_dataset_chunked_named_vl(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_dataset_compressed_named_vl(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_dataset_compact_vl_vl(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_dataset_contig_vl_vl(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_dataset_chunked_vl_vl(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_dataset_compressed_vl_vl(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_dataset_contig_cmpd_vl(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_dataset_chunked_cmpd_vl(fcpl_src, fcpl_dst, my_fapl); - nerrors += test_copy_dataset_compact_cmpd_vl(fcpl_src, fcpl_dst, my_fapl); - - nerrors += test_copy_same_file_named_datatype(fcpl_src, my_fapl); - nerrors += test_copy_old_layout(fcpl_dst, my_fapl); - nerrors += test_copy_null_ref(fcpl_src, fcpl_dst, my_fapl); + nerrors += test_copy_named_datatype(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_named_datatype_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_named_datatype_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + + nerrors += test_copy_dataset_external(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_dataset_named_dtype(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_dataset_named_dtype_hier(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_dataset_named_dtype_hier_outside(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + + nerrors += test_copy_dataset_contig_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_dataset_chunked_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_dataset_compact_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_dataset_compressed_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_attribute_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_dataset_compact_named_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_dataset_contig_named_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_dataset_chunked_named_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_dataset_compressed_named_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_dataset_compact_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_dataset_contig_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_dataset_chunked_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_dataset_compressed_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_dataset_contig_cmpd_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_dataset_chunked_cmpd_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + nerrors += test_copy_dataset_compact_cmpd_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl); + + nerrors += test_copy_same_file_named_datatype(fcpl_src, src_fapl); + nerrors += test_copy_old_layout(fcpl_dst, dst_fapl); + nerrors += test_copy_null_ref(fcpl_src, fcpl_dst, src_fapl, dst_fapl); } /* TODO: not implemented - nerrors += test_copy_mount(my_fapl); + nerrors += test_copy_mount(src_fapl); */ } /* end for */ -- cgit v0.12