summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt4
-rw-r--r--test/Makefile.am2
-rw-r--r--test/cache_tagging.c165
-rw-r--r--test/efc.c668
-rw-r--r--test/getname.c125
-rw-r--r--test/links.c107
-rw-r--r--test/links_env.c130
-rw-r--r--test/objcopy.c765
-rw-r--r--test/testvdsswmr.sh.in18
-rw-r--r--test/tsohm.c53
-rw-r--r--test/vds.c92
-rw-r--r--test/vds_env.c325
-rw-r--r--test/vol.c152
13 files changed, 1431 insertions, 1175 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 4e543fd..8afa7c4 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -555,8 +555,8 @@ if (HDF5_ENABLE_FORMATTERS)
clang_format (HDF5_TEST_thread_id_FORMAT thread_id)
endif ()
-if (HDF5_BUILD_UTILS) # requires mirror server
- #-- Adding test for mirror_vfd
+if (HDF5_BUILD_UTILS)
+ #-- Adding test for mirror_vfd (requires mirror server)
add_executable (mirror_vfd ${mirror_vfd_SOURCES})
target_include_directories (mirror_vfd PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
diff --git a/test/Makefile.am b/test/Makefile.am
index ff09003..57f89b0 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -223,7 +223,7 @@ CHECK_CLEANFILES+=accum.h5 cmpd_dset.h5 compact_dataset.h5 dataset.h5 dset_offse
test_swmr*.h5 cache_logging.h5 cache_logging.out vds_swmr.h5 vds_swmr_src_*.h5 \
swmr[0-2].h5 swmr_writer.out swmr_writer.log.* swmr_reader.out.* swmr_reader.log.* \
tbogus.h5.copy cache_image_test.h5 direct_chunk.h5 native_vol_test.h5 \
- splitter*.h5 splitter.log mirror_rw mirror_ro event_set_[0-9].h5
+ splitter*.h5 splitter.log mirror_rw mirror_ro event_set_[0-9].h5 vol_public.h5
# Sources for testhdf5 executable
testhdf5_SOURCES=testhdf5.c tarray.c tattr.c tchecksum.c tconfig.c tfile.c \
diff --git a/test/cache_tagging.c b/test/cache_tagging.c
index b69a501..fce0bf5 100644
--- a/test/cache_tagging.c
+++ b/test/cache_tagging.c
@@ -4288,10 +4288,11 @@ check_external_link_open_tags(void)
hid_t gid = -1; /* Dataspace Identifier */
hid_t xid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */
- H5O_native_info_t ninfo; /* Native object info struct */
- hid_t fapl = -1; /* File access prop list */
+ int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */
+ H5O_native_info_t ninfo; /* Native object info struct */
+ hid_t fapl = -1; /* File access prop list */
+ hbool_t is_native; /* Whether the native VOL connector is being used */
haddr_t root_tag = 0;
haddr_t root2_tag = 0;
@@ -4306,9 +4307,14 @@ check_external_link_open_tags(void)
if ((fapl = h5_fileaccess_flags(H5_FILEACCESS_LIBVER)) < 0)
TEST_ERROR;
+ /* Check for operating with native (only) VOL connector */
+ is_native = FALSE;
+ if (H5VL_fapl_is_native(fapl, &is_native) < 0)
+ TEST_ERROR;
+
/* Create a test file */
if ((fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR;
+ FAIL_STACK_ERROR;
/* determine tag value of root group's object header */
if (get_object_header_tag(fid, &root_tag) < 0)
@@ -4316,7 +4322,7 @@ check_external_link_open_tags(void)
/* Create a second file */
if ((fid2 = H5Fcreate(FILENAME2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR;
+ FAIL_STACK_ERROR;
/* determine tag value of root group's object header */
if (get_object_header_tag(fid2, &root2_tag) < 0)
@@ -4324,26 +4330,26 @@ check_external_link_open_tags(void)
/* Create group in second file */
if ((gid = H5Gcreate2(fid2, GROUPNAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR;
+ FAIL_STACK_ERROR;
/* Close out second file */
if ((H5Gclose(gid)) < 0)
- TEST_ERROR;
+ FAIL_STACK_ERROR;
if ((H5Fclose(fid2)) < 0)
- TEST_ERROR;
+ FAIL_STACK_ERROR;
/* Create external link to second file */
if (H5Lcreate_external(FILENAME2, GROUPNAMEPATH, fid, LINKNAME, H5P_DEFAULT, H5P_DEFAULT) < 0)
- TEST_ERROR;
+ FAIL_STACK_ERROR;
/* Close and Reopen the file */
if (H5Fclose(fid) < 0)
- TEST_ERROR;
+ FAIL_STACK_ERROR;
if ((fid = H5Fopen(FILENAME, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR;
+ FAIL_STACK_ERROR;
if (H5Pclose(fapl) < 0)
- TEST_ERROR;
+ FAIL_STACK_ERROR;
/* Evict as much as we can from the cache so we can track full tag path */
if (evict_entries(fid) < 0)
@@ -4353,78 +4359,95 @@ check_external_link_open_tags(void)
/* Open External Link */
/* ================== */
- if ((xid = H5Gopen2(fid, LINKNAME, H5P_DEFAULT)) < 0)
- TEST_ERROR;
- if ((fid2 = H5Iget_file_id(xid)) < 0)
- TEST_ERROR;
- if (get_object_header_tag(xid, &link_tag) < 0)
- TEST_ERROR;
+ H5E_BEGIN_TRY
+ {
+ xid = H5Gopen2(fid, LINKNAME, H5P_DEFAULT);
+ }
+ H5E_END_TRY
+ if (is_native) {
+ if (xid < 0)
+ FAIL_STACK_ERROR;
+ if ((fid2 = H5Iget_file_id(xid)) < 0)
+ FAIL_STACK_ERROR;
+ if (get_object_header_tag(xid, &link_tag) < 0)
+ TEST_ERROR;
- /* Even though we do nothing with this, touching the internal
- * data structures is needed for the test to pass.
- */
- if (H5Oget_native_info(xid, &ninfo, H5O_NATIVE_INFO_ALL) < 0)
- TEST_ERROR;
+ /* Even though we do nothing with this, touching the internal
+ * data structures is needed for the test to pass.
+ */
+ if (H5Oget_native_info(xid, &ninfo, H5O_NATIVE_INFO_ALL) < 0)
+ FAIL_STACK_ERROR;
- /* =================================== */
- /* Verification of Metadata Tag Values */
- /* =================================== */
+ /* =================================== */
+ /* Verification of Metadata Tag Values */
+ /* =================================== */
#ifndef NDEBUG
- /* if verbose, print cache index to screen for visual verification */
- if (verbose)
- dump_cache(fid);
+ /* if verbose, print cache index to screen for visual verification */
+ if (verbose)
+ dump_cache(fid);
#endif /* NDEBUG */ /* end debugging functions */
- /* verify tag value of first file's root group */
- if (verify_tag(fid, H5AC_OHDR_ID, root_tag) < 0)
- TEST_ERROR;
- if (verify_tag(fid, H5AC_OHDR_CHK_ID, root_tag) < 0)
- TEST_ERROR;
+ /* verify tag value of first file's root group */
+ if (verify_tag(fid, H5AC_OHDR_ID, root_tag) < 0)
+ TEST_ERROR;
+ if (verify_tag(fid, H5AC_OHDR_CHK_ID, root_tag) < 0)
+ TEST_ERROR;
- /* verify there is a superblock entry with superblock tag. */
- if (verify_tag(fid2, H5AC_SUPERBLOCK_ID, H5AC__SUPERBLOCK_TAG) < 0)
- TEST_ERROR;
+ /* verify there is a superblock entry with superblock tag. */
+ if (verify_tag(fid2, H5AC_SUPERBLOCK_ID, H5AC__SUPERBLOCK_TAG) < 0)
+ TEST_ERROR;
- /* verify tag value of linked file's root group */
- if (verify_tag(fid2, H5AC_OHDR_ID, root2_tag) < 0)
- TEST_ERROR;
- if (verify_tag(fid2, H5AC_LHEAP_PRFX_ID, root2_tag) < 0)
- TEST_ERROR;
- if (verify_tag(fid2, H5AC_BT_ID, root2_tag) < 0)
- TEST_ERROR;
- if (verify_tag(fid2, H5AC_SNODE_ID, root2_tag) < 0)
- TEST_ERROR;
+ /* verify tag value of linked file's root group */
+ if (verify_tag(fid2, H5AC_OHDR_ID, root2_tag) < 0)
+ TEST_ERROR;
+ if (verify_tag(fid2, H5AC_LHEAP_PRFX_ID, root2_tag) < 0)
+ TEST_ERROR;
+ if (verify_tag(fid2, H5AC_BT_ID, root2_tag) < 0)
+ TEST_ERROR;
+ if (verify_tag(fid2, H5AC_SNODE_ID, root2_tag) < 0)
+ TEST_ERROR;
- /* verify tag value of linked group's object header */
- if (verify_tag(fid2, H5AC_OHDR_ID, link_tag) < 0)
- TEST_ERROR;
- if (verify_tag(fid2, H5AC_LHEAP_PRFX_ID, link_tag) < 0)
- TEST_ERROR;
- if (verify_tag(fid2, H5AC_BT_ID, link_tag) < 0)
- TEST_ERROR;
+ /* verify tag value of linked group's object header */
+ if (verify_tag(fid2, H5AC_OHDR_ID, link_tag) < 0)
+ TEST_ERROR;
+ if (verify_tag(fid2, H5AC_LHEAP_PRFX_ID, link_tag) < 0)
+ TEST_ERROR;
+ if (verify_tag(fid2, H5AC_BT_ID, link_tag) < 0)
+ TEST_ERROR;
- /* verify no other entries present */
- if (verify_no_unknown_tags(fid) < 0)
- TEST_ERROR;
- if (verify_no_unknown_tags(fid2) < 0)
- TEST_ERROR;
+ /* verify no other entries present */
+ if (verify_no_unknown_tags(fid) < 0)
+ TEST_ERROR;
+ if (verify_no_unknown_tags(fid2) < 0)
+ TEST_ERROR;
- /* Reset the changes we've made to the cache's data structures */
- if (reset_all_entries_investigated(fid) < 0)
- TEST_ERROR;
- if (reset_all_entries_investigated(fid2) < 0)
- TEST_ERROR;
+ /* Reset the changes we've made to the cache's data structures */
+ if (reset_all_entries_investigated(fid) < 0)
+ TEST_ERROR;
+ if (reset_all_entries_investigated(fid2) < 0)
+ TEST_ERROR;
- /* =========================== */
- /* Close open objects and file */
- /* =========================== */
- if (H5Gclose(xid) < 0)
+ /* ================== */
+ /* Close open objects */
+ /* ================== */
+ if (H5Gclose(xid) < 0)
+ FAIL_STACK_ERROR;
+
+ /* ========== */
+ /* Close file */
+ /* ========== */
+ if (H5Fclose(fid2) < 0)
+ FAIL_STACK_ERROR;
+ }
+ else if (xid >= 0)
TEST_ERROR;
+
+ /* ========== */
+ /* Close file */
+ /* ========== */
if (H5Fclose(fid) < 0)
- TEST_ERROR;
- if (H5Fclose(fid2) < 0)
- TEST_ERROR;
+ FAIL_STACK_ERROR;
/* ========================================== */
/* Finished Test. Print status and return. */
diff --git a/test/efc.c b/test/efc.c
index e61eb1b..6f6c081 100644
--- a/test/efc.c
+++ b/test/efc.c
@@ -33,11 +33,6 @@ const char *FILENAME[] = {"efc0", "efc1", "efc2", "efc3", "efc4", "efc5", NULL};
#define N_FILENAMES 6
static char *filename[N_FILENAMES];
-/* Global property lists - just copies of the defaults (necessary to use
- * internal functions */
-hid_t fcpl_id = H5I_INVALID_HID;
-hid_t fapl_id = H5I_INVALID_HID;
-
/*-------------------------------------------------------------------------
* Function: test_single
*
@@ -52,7 +47,7 @@ hid_t fapl_id = H5I_INVALID_HID;
*-------------------------------------------------------------------------
*/
static unsigned
-test_single(void)
+test_single(hid_t fapl_id, hid_t fcpl_id)
{
H5F_t *f0 = NULL; /* Parent file containing EFC */
H5F_t *f1 = NULL; /* Child file */
@@ -84,8 +79,7 @@ test_single(void)
* count = 2, release EFC, verify ref count = 1. Verifies a file can be
* held open by the EFC.
*/
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
@@ -103,13 +97,12 @@ test_single(void)
/* Test 2: Verify that subsequent efc_open requests return the cached top
* level file pointer. Open file 1 through EFC, close, open again, verify
* file pointers are the same. */
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
ftmp1 = f1;
if (H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
- if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (f1 != ftmp1)
TEST_ERROR
@@ -124,8 +117,7 @@ test_single(void)
* that the one added first is evicted. Then reopen files in a different
* order. Open each file normally after closing through EFC the first time
* to track ref counts. */
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
@@ -134,8 +126,7 @@ test_single(void)
if (f1->shared->nrefs != 2)
TEST_ERROR
- if (NULL ==
- (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f0, f2) < 0)
FAIL_STACK_ERROR
@@ -146,8 +137,7 @@ test_single(void)
if (f2->shared->nrefs != 2)
TEST_ERROR
- if (NULL ==
- (f3 = H5F__efc_open(f0, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f3 = H5F__efc_open(f0, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f0, f3) < 0)
FAIL_STACK_ERROR
@@ -160,8 +150,7 @@ test_single(void)
if (f3->shared->nrefs != 2)
TEST_ERROR
- if (NULL ==
- (f4 = H5F__efc_open(f0, filename[4], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f4 = H5F__efc_open(f0, filename[4], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f0, f4) < 0)
FAIL_STACK_ERROR
@@ -176,7 +165,7 @@ test_single(void)
if (f4->shared->nrefs != 2)
TEST_ERROR
- if (NULL == (ftmp3 = H5F__efc_open(f0, filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp3 = H5F__efc_open(f0, filename[3], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f0, ftmp3) < 0)
FAIL_STACK_ERROR
@@ -189,7 +178,7 @@ test_single(void)
if (f4->shared->nrefs != 2)
TEST_ERROR
- if (NULL == (ftmp2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f0, ftmp2) < 0)
FAIL_STACK_ERROR
@@ -202,7 +191,7 @@ test_single(void)
if (f4->shared->nrefs != 2)
TEST_ERROR
- if (NULL == (ftmp1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f0, ftmp1) < 0)
FAIL_STACK_ERROR
@@ -215,7 +204,7 @@ test_single(void)
if (f4->shared->nrefs != 1)
TEST_ERROR
- if (NULL == (ftmp4 = H5F__efc_open(f0, filename[4], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp4 = H5F__efc_open(f0, filename[4], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f0, ftmp4) < 0)
FAIL_STACK_ERROR
@@ -249,8 +238,7 @@ test_single(void)
/* Test 4: Verify that files kept open through the EFC are not evicted by
* H5F__efc_release(). */
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (NULL == (ftmp1 = H5F_open(filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
@@ -275,8 +263,7 @@ test_single(void)
* filling up the cache. Open 4 files while holding the first open. Verify
* that the second file is evicted. Close the first file, reopen the
* second, and verify that the first file is evicted. */
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (NULL == (ftmp1 = H5F_open(filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
@@ -285,8 +272,7 @@ test_single(void)
if (ftmp1->shared->nrefs != 2)
TEST_ERROR
- if (NULL ==
- (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f0, f2) < 0)
FAIL_STACK_ERROR
@@ -295,16 +281,14 @@ test_single(void)
if (ftmp2->shared->nrefs != 2)
TEST_ERROR
- if (NULL ==
- (f3 = H5F__efc_open(f0, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f3 = H5F__efc_open(f0, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f0, f3) < 0)
FAIL_STACK_ERROR
if (ftmp2->shared->nrefs != 2)
TEST_ERROR
- if (NULL ==
- (f4 = H5F__efc_open(f0, filename[4], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f4 = H5F__efc_open(f0, filename[4], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f0, f4) < 0)
FAIL_STACK_ERROR
@@ -317,7 +301,7 @@ test_single(void)
FAIL_STACK_ERROR
if (ftmp1->shared->nrefs != 2)
TEST_ERROR
- if (NULL == (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f0, f2) < 0)
FAIL_STACK_ERROR
@@ -325,7 +309,7 @@ test_single(void)
TEST_ERROR
if (ftmp2->shared->nrefs != 2)
TEST_ERROR
- if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
@@ -349,8 +333,7 @@ test_single(void)
* prevents further files from being cached. Open and hold open 3 files
* through the EFC, then open the fourth and verify that it was not added to
* the EFC. */
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (NULL == (ftmp1 = H5F_open(filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
@@ -359,8 +342,7 @@ test_single(void)
if (ftmp1->shared->nrefs != 2)
TEST_ERROR
- if (NULL ==
- (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (NULL == (ftmp2 = H5F_open(filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
@@ -369,8 +351,7 @@ test_single(void)
if (ftmp2->shared->nrefs != 2)
TEST_ERROR
- if (NULL ==
- (f3 = H5F__efc_open(f0, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f3 = H5F__efc_open(f0, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (NULL == (ftmp3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
@@ -379,8 +360,7 @@ test_single(void)
if (ftmp3->shared->nrefs != 2)
TEST_ERROR
- if (NULL ==
- (f4 = H5F__efc_open(f0, filename[4], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f4 = H5F__efc_open(f0, filename[4], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f0, f4) < 0)
FAIL_STACK_ERROR
@@ -422,11 +402,9 @@ test_single(void)
/* Test 7: Test multiple file opens. Open a file twice, close it once, then
* verify that it is not evicted by H5F__efc_release(). */
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f2 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f2 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (NULL == (ftmp1 = H5F_open(filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
@@ -476,7 +454,7 @@ error:
*-------------------------------------------------------------------------
*/
static unsigned
-test_graph_nocycle(void)
+test_graph_nocycle(hid_t fapl_id, hid_t fcpl_id)
{
H5F_t *f0 = NULL; /* Parent file containing EFC */
H5F_t *f1 = NULL; /* Child file */
@@ -504,11 +482,9 @@ test_graph_nocycle(void)
*/
if (NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f2 = H5F__efc_open(f1, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f2 = H5F__efc_open(f1, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, f2) < 0)
FAIL_STACK_ERROR
@@ -532,10 +508,10 @@ test_graph_nocycle(void)
if (NULL ==
(ftmp1 = H5F_open(filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (f2 = H5F__efc_open(ftmp1, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id,
- fapl_id)))
+ if (NULL ==
+ (f2 = H5F__efc_open(ftmp1, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_try_close(ftmp1, NULL) < 0)
FAIL_STACK_ERROR
@@ -562,11 +538,9 @@ test_graph_nocycle(void)
if (NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f2 = H5F__efc_open(f1, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f2 = H5F__efc_open(f1, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, f2) < 0)
FAIL_STACK_ERROR
@@ -577,11 +551,9 @@ test_graph_nocycle(void)
if (ftmp2->shared->nrefs != 2)
TEST_ERROR
- if (NULL ==
- (f3 = H5F__efc_open(f0, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f3 = H5F__efc_open(f0, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f4 = H5F__efc_open(f3, filename[4], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f4 = H5F__efc_open(f3, filename[4], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f3, f4) < 0)
FAIL_STACK_ERROR
@@ -614,13 +586,11 @@ test_graph_nocycle(void)
FAIL_STACK_ERROR
if (NULL == (f1 = H5F_open(filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp2 = H5F__efc_open(f1, filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp2 = H5F__efc_open(f1, filename[2], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f3 = H5F__efc_open(f2, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f3 = H5F__efc_open(f2, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f2, f3) < 0)
FAIL_STACK_ERROR
@@ -638,7 +608,7 @@ test_graph_nocycle(void)
if (ftmp3->shared->nrefs != 2)
TEST_ERROR
- if (NULL == (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f0, f2) < 0)
FAIL_STACK_ERROR
@@ -664,18 +634,15 @@ test_graph_nocycle(void)
* files. */
if (NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f3 = H5F__efc_open(f2, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f3 = H5F__efc_open(f2, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f2, f3) < 0)
FAIL_STACK_ERROR
- if (NULL == (f3 = H5F__efc_open(f1, filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (f3 = H5F__efc_open(f1, filename[3], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, f3) < 0)
FAIL_STACK_ERROR
@@ -703,25 +670,21 @@ test_graph_nocycle(void)
* files. */
if (NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f3 = H5F__efc_open(f0, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f3 = H5F__efc_open(f0, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f4 = H5F__efc_open(f0, filename[4], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f4 = H5F__efc_open(f0, filename[4], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f0, f4) < 0)
FAIL_STACK_ERROR
if (H5F_efc_close(f0, f3) < 0)
FAIL_STACK_ERROR
- if (NULL == (f3 = H5F__efc_open(f1, filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (f3 = H5F__efc_open(f1, filename[3], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (f4 = H5F__efc_open(f1, filename[4], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (f4 = H5F__efc_open(f1, filename[4], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, f4) < 0)
FAIL_STACK_ERROR
@@ -729,15 +692,15 @@ test_graph_nocycle(void)
FAIL_STACK_ERROR
if (H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
- if (NULL == (f3 = H5F__efc_open(f2, filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (f3 = H5F__efc_open(f2, filename[3], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (f4 = H5F__efc_open(f2, filename[4], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (f4 = H5F__efc_open(f2, filename[4], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f2, f4) < 0)
FAIL_STACK_ERROR
if (H5F_efc_close(f0, f2) < 0)
FAIL_STACK_ERROR
- if (NULL == (f4 = H5F__efc_open(f3, filename[4], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (f4 = H5F__efc_open(f3, filename[4], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f3, f4) < 0)
FAIL_STACK_ERROR
@@ -799,7 +762,7 @@ error:
*-------------------------------------------------------------------------
*/
static unsigned
-test_graph_cycle(void)
+test_graph_cycle(hid_t fapl_id, hid_t fcpl_id)
{
H5F_t *f0 = NULL; /* File */
H5F_t *f1 = NULL; /* File */
@@ -826,7 +789,7 @@ test_graph_cycle(void)
*/
if (NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f0, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f0, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f0, ftmp0) < 0)
FAIL_STACK_ERROR
@@ -837,7 +800,7 @@ test_graph_cycle(void)
if (f0->shared->nrefs != 1)
TEST_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f0, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f0, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f0, ftmp0) < 0)
FAIL_STACK_ERROR
@@ -857,10 +820,9 @@ test_graph_cycle(void)
* the file is part of another file's EFC. */
if (NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp1 = H5F__efc_open(f1, filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp1 = H5F__efc_open(f1, filename[1], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, ftmp1) < 0)
FAIL_STACK_ERROR
@@ -877,10 +839,9 @@ test_graph_cycle(void)
if (H5F_try_close(f1, NULL) < 0)
FAIL_STACK_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp1 = H5F__efc_open(f1, filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp1 = H5F__efc_open(f1, filename[1], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, ftmp1) < 0)
FAIL_STACK_ERROR
@@ -900,10 +861,9 @@ test_graph_cycle(void)
/* Test 3: Simple 2 file cycle */
if (NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
@@ -916,10 +876,9 @@ test_graph_cycle(void)
if (f0->shared->nrefs != 1)
TEST_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
@@ -939,13 +898,11 @@ test_graph_cycle(void)
/* Test 4: Simple 2 file cycle (indirectly referenced) */
if (NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f2 = H5F__efc_open(f1, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f2 = H5F__efc_open(f1, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp1 = H5F__efc_open(f2, filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp1 = H5F__efc_open(f2, filename[1], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f2, ftmp1) < 0)
FAIL_STACK_ERROR
@@ -967,19 +924,17 @@ test_graph_cycle(void)
/* Test 5: Parallel double cycle */
if (NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
if (H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
- if (NULL ==
- (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f2, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f2, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f2, ftmp0) < 0)
FAIL_STACK_ERROR
@@ -999,19 +954,17 @@ test_graph_cycle(void)
/* Test 6: Parallel double cycle with release */
if (NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
if (H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
- if (NULL ==
- (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f2, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f2, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f2, ftmp0) < 0)
FAIL_STACK_ERROR
@@ -1029,24 +982,21 @@ test_graph_cycle(void)
/* Test 7: Chained parallel double cycle */
if (NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f2 = H5F__efc_open(f1, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f2 = H5F__efc_open(f1, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp1 = H5F__efc_open(f2, filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp1 = H5F__efc_open(f2, filename[1], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f2, ftmp1) < 0)
FAIL_STACK_ERROR
if (H5F_efc_close(f1, f2) < 0)
FAIL_STACK_ERROR
- if (NULL ==
- (f3 = H5F__efc_open(f1, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f3 = H5F__efc_open(f1, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp1 = H5F__efc_open(f3, filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp1 = H5F__efc_open(f3, filename[1], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f3, ftmp1) < 0)
FAIL_STACK_ERROR
@@ -1070,24 +1020,21 @@ test_graph_cycle(void)
/* Test 8: Chained parallel double cycle with release */
if (NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f2 = H5F__efc_open(f1, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f2 = H5F__efc_open(f1, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp1 = H5F__efc_open(f2, filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp1 = H5F__efc_open(f2, filename[1], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f2, ftmp1) < 0)
FAIL_STACK_ERROR
if (H5F_efc_close(f1, f2) < 0)
FAIL_STACK_ERROR
- if (NULL ==
- (f3 = H5F__efc_open(f1, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f3 = H5F__efc_open(f1, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp1 = H5F__efc_open(f3, filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp1 = H5F__efc_open(f3, filename[1], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f3, ftmp1) < 0)
FAIL_STACK_ERROR
@@ -1111,10 +1058,9 @@ test_graph_cycle(void)
FAIL_STACK_ERROR
if (NULL == (ftmp0 = H5F_open(filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp1 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp1 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, ftmp1) < 0)
FAIL_STACK_ERROR
@@ -1140,12 +1086,11 @@ test_graph_cycle(void)
/* Test 10: Simple 2 file cycle, extra ID on second file */
if (NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (NULL == (ftmp1 = H5F_open(filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
@@ -1185,21 +1130,19 @@ test_graph_cycle(void)
/* Test 11: Parallel double cycle, extra ID on a child file */
if (NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
if (H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
- if (NULL ==
- (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (NULL == (ftmp2 = H5F_open(filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f2, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f2, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f2, ftmp0) < 0)
FAIL_STACK_ERROR
@@ -1245,21 +1188,19 @@ test_graph_cycle(void)
/* Test 12: Parallel double cycle, extra ID on a child file, with release */
if (NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
if (H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
- if (NULL ==
- (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (NULL == (ftmp2 = H5F_open(filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f2, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f2, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f2, ftmp0) < 0)
FAIL_STACK_ERROR
@@ -1291,26 +1232,23 @@ test_graph_cycle(void)
/* Test 13: Chained parallel double cycle, extra ID on a child file */
if (NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f2 = H5F__efc_open(f1, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f2 = H5F__efc_open(f1, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp1 = H5F__efc_open(f2, filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp1 = H5F__efc_open(f2, filename[1], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f2, ftmp1) < 0)
FAIL_STACK_ERROR
if (H5F_efc_close(f1, f2) < 0)
FAIL_STACK_ERROR
- if (NULL ==
- (f3 = H5F__efc_open(f1, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f3 = H5F__efc_open(f1, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (NULL == (ftmp3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp1 = H5F__efc_open(f3, filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp1 = H5F__efc_open(f3, filename[1], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f3, ftmp1) < 0)
FAIL_STACK_ERROR
@@ -1367,26 +1305,23 @@ test_graph_cycle(void)
* release */
if (NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f2 = H5F__efc_open(f1, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f2 = H5F__efc_open(f1, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp1 = H5F__efc_open(f2, filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp1 = H5F__efc_open(f2, filename[1], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f2, ftmp1) < 0)
FAIL_STACK_ERROR
if (H5F_efc_close(f1, f2) < 0)
FAIL_STACK_ERROR
- if (NULL ==
- (f3 = H5F__efc_open(f1, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f3 = H5F__efc_open(f1, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (NULL == (ftmp3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp1 = H5F__efc_open(f3, filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp1 = H5F__efc_open(f3, filename[1], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f3, ftmp1) < 0)
FAIL_STACK_ERROR
@@ -1422,22 +1357,19 @@ test_graph_cycle(void)
/* Test 15: One local and one remote cycle */
if (NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
if (H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
- if (NULL ==
- (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f3 = H5F__efc_open(f2, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f3 = H5F__efc_open(f2, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp2 = H5F__efc_open(f3, filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp2 = H5F__efc_open(f3, filename[2], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f3, ftmp2) < 0)
FAIL_STACK_ERROR
@@ -1478,22 +1410,19 @@ test_graph_cycle(void)
/* Test 16: One local and one remote cycle, with release */
if (NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
if (H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
- if (NULL ==
- (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f3 = H5F__efc_open(f2, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f3 = H5F__efc_open(f2, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp2 = H5F__efc_open(f3, filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp2 = H5F__efc_open(f3, filename[2], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f3, ftmp2) < 0)
FAIL_STACK_ERROR
@@ -1532,24 +1461,21 @@ test_graph_cycle(void)
/* Test 17: One local and one remote cycle, remote cycle held open */
if (NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
if (H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
- if (NULL ==
- (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f3 = H5F__efc_open(f2, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f3 = H5F__efc_open(f2, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (NULL == (ftmp3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp2 = H5F__efc_open(f3, filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp2 = H5F__efc_open(f3, filename[2], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f3, ftmp2) < 0)
FAIL_STACK_ERROR
@@ -1596,24 +1522,21 @@ test_graph_cycle(void)
* release */
if (NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
if (H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
- if (NULL ==
- (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f3 = H5F__efc_open(f2, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f3 = H5F__efc_open(f2, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (NULL == (ftmp3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp2 = H5F__efc_open(f3, filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp2 = H5F__efc_open(f3, filename[2], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f3, ftmp2) < 0)
FAIL_STACK_ERROR
@@ -1663,42 +1586,37 @@ test_graph_cycle(void)
* Also cycle between bottom (root) and top and cycles on the sides. */
if (NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f3 = H5F__efc_open(f1, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f3 = H5F__efc_open(f1, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, f3) < 0)
FAIL_STACK_ERROR
- if (NULL == (f3 = H5F__efc_open(f2, filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (f3 = H5F__efc_open(f2, filename[3], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f2, f3) < 0)
FAIL_STACK_ERROR
- if (NULL == (f3 = H5F__efc_open(f0, filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (f3 = H5F__efc_open(f0, filename[3], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f3, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f3, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f3, ftmp0) < 0)
FAIL_STACK_ERROR
if (H5F_efc_close(f0, f3) < 0)
FAIL_STACK_ERROR
- if (NULL ==
- (f4 = H5F__efc_open(f1, filename[4], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f4 = H5F__efc_open(f1, filename[4], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp1 = H5F__efc_open(f4, filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp1 = H5F__efc_open(f4, filename[1], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f4, ftmp1) < 0)
FAIL_STACK_ERROR
if (H5F_efc_close(f1, f4) < 0)
FAIL_STACK_ERROR
- if (NULL ==
- (f5 = H5F__efc_open(f2, filename[5], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f5 = H5F__efc_open(f2, filename[5], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp2 = H5F__efc_open(f5, filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp2 = H5F__efc_open(f5, filename[2], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f5, ftmp2) < 0)
FAIL_STACK_ERROR
@@ -1755,42 +1673,37 @@ test_graph_cycle(void)
* release the files instead of closing. */
if (NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f3 = H5F__efc_open(f1, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f3 = H5F__efc_open(f1, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, f3) < 0)
FAIL_STACK_ERROR
- if (NULL == (f3 = H5F__efc_open(f2, filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (f3 = H5F__efc_open(f2, filename[3], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f2, f3) < 0)
FAIL_STACK_ERROR
- if (NULL == (f3 = H5F__efc_open(f0, filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (f3 = H5F__efc_open(f0, filename[3], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f3, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f3, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f3, ftmp0) < 0)
FAIL_STACK_ERROR
if (H5F_efc_close(f0, f3) < 0)
FAIL_STACK_ERROR
- if (NULL ==
- (f4 = H5F__efc_open(f1, filename[4], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f4 = H5F__efc_open(f1, filename[4], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp1 = H5F__efc_open(f4, filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp1 = H5F__efc_open(f4, filename[1], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f4, ftmp1) < 0)
FAIL_STACK_ERROR
if (H5F_efc_close(f1, f4) < 0)
FAIL_STACK_ERROR
- if (NULL ==
- (f5 = H5F__efc_open(f2, filename[5], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f5 = H5F__efc_open(f2, filename[5], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp2 = H5F__efc_open(f5, filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp2 = H5F__efc_open(f5, filename[2], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f5, ftmp2) < 0)
FAIL_STACK_ERROR
@@ -1844,33 +1757,29 @@ test_graph_cycle(void)
* Also cycle between bottom (root) and top, cycles on sides held open. */
if (NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f3 = H5F__efc_open(f1, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f3 = H5F__efc_open(f1, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, f3) < 0)
FAIL_STACK_ERROR
- if (NULL == (f3 = H5F__efc_open(f2, filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (f3 = H5F__efc_open(f2, filename[3], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f2, f3) < 0)
FAIL_STACK_ERROR
- if (NULL == (f3 = H5F__efc_open(f0, filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (f3 = H5F__efc_open(f0, filename[3], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f3, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f3, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f3, ftmp0) < 0)
FAIL_STACK_ERROR
if (H5F_efc_close(f0, f3) < 0)
FAIL_STACK_ERROR
- if (NULL ==
- (f4 = H5F__efc_open(f1, filename[4], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f4 = H5F__efc_open(f1, filename[4], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp1 = H5F__efc_open(f4, filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp1 = H5F__efc_open(f4, filename[1], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f4, ftmp1) < 0)
FAIL_STACK_ERROR
@@ -1878,10 +1787,9 @@ test_graph_cycle(void)
FAIL_STACK_ERROR
if (NULL == (f4 = H5F_open(filename[4], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f5 = H5F__efc_open(f2, filename[5], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f5 = H5F__efc_open(f2, filename[5], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp2 = H5F__efc_open(f5, filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp2 = H5F__efc_open(f5, filename[2], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f5, ftmp2) < 0)
FAIL_STACK_ERROR
@@ -1974,33 +1882,29 @@ test_graph_cycle(void)
* Also release the files instead of closing. */
if (NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f3 = H5F__efc_open(f1, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f3 = H5F__efc_open(f1, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, f3) < 0)
FAIL_STACK_ERROR
- if (NULL == (f3 = H5F__efc_open(f2, filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (f3 = H5F__efc_open(f2, filename[3], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f2, f3) < 0)
FAIL_STACK_ERROR
- if (NULL == (f3 = H5F__efc_open(f0, filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (f3 = H5F__efc_open(f0, filename[3], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f3, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f3, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f3, ftmp0) < 0)
FAIL_STACK_ERROR
if (H5F_efc_close(f0, f3) < 0)
FAIL_STACK_ERROR
- if (NULL ==
- (f4 = H5F__efc_open(f1, filename[4], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f4 = H5F__efc_open(f1, filename[4], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp1 = H5F__efc_open(f4, filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp1 = H5F__efc_open(f4, filename[1], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f4, ftmp1) < 0)
FAIL_STACK_ERROR
@@ -2008,10 +1912,9 @@ test_graph_cycle(void)
FAIL_STACK_ERROR
if (NULL == (f4 = H5F_open(filename[4], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f5 = H5F__efc_open(f2, filename[5], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f5 = H5F__efc_open(f2, filename[5], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp2 = H5F__efc_open(f5, filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp2 = H5F__efc_open(f5, filename[2], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f5, ftmp2) < 0)
FAIL_STACK_ERROR
@@ -2086,67 +1989,64 @@ test_graph_cycle(void)
* itself). */
if (NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f0, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f0, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f0, ftmp0) < 0)
FAIL_STACK_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f3 = H5F__efc_open(f0, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f3 = H5F__efc_open(f0, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
- if (NULL == (ftmp1 = H5F__efc_open(f1, filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp1 = H5F__efc_open(f1, filename[1], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, ftmp1) < 0)
FAIL_STACK_ERROR
- if (NULL == (ftmp2 = H5F__efc_open(f1, filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp2 = H5F__efc_open(f1, filename[2], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, ftmp2) < 0)
FAIL_STACK_ERROR
- if (NULL == (ftmp3 = H5F__efc_open(f1, filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp3 = H5F__efc_open(f1, filename[3], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, ftmp3) < 0)
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f2, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f2, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f2, ftmp0) < 0)
FAIL_STACK_ERROR
- if (NULL == (ftmp1 = H5F__efc_open(f2, filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp1 = H5F__efc_open(f2, filename[1], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f2, ftmp1) < 0)
FAIL_STACK_ERROR
- if (NULL == (ftmp2 = H5F__efc_open(f2, filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp2 = H5F__efc_open(f2, filename[2], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f2, ftmp2) < 0)
FAIL_STACK_ERROR
- if (NULL == (ftmp3 = H5F__efc_open(f2, filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp3 = H5F__efc_open(f2, filename[3], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f2, ftmp3) < 0)
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f3, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f3, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f3, ftmp0) < 0)
FAIL_STACK_ERROR
- if (NULL == (ftmp1 = H5F__efc_open(f3, filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp1 = H5F__efc_open(f3, filename[1], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f3, ftmp1) < 0)
FAIL_STACK_ERROR
- if (NULL == (ftmp2 = H5F__efc_open(f3, filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp2 = H5F__efc_open(f3, filename[2], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f3, ftmp2) < 0)
FAIL_STACK_ERROR
- if (NULL == (ftmp3 = H5F__efc_open(f3, filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp3 = H5F__efc_open(f3, filename[3], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f3, ftmp3) < 0)
FAIL_STACK_ERROR
@@ -2189,67 +2089,64 @@ test_graph_cycle(void)
* itself). Release the files instead of closing. */
if (NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f0, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f0, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f0, ftmp0) < 0)
FAIL_STACK_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f3 = H5F__efc_open(f0, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f3 = H5F__efc_open(f0, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
- if (NULL == (ftmp1 = H5F__efc_open(f1, filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp1 = H5F__efc_open(f1, filename[1], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, ftmp1) < 0)
FAIL_STACK_ERROR
- if (NULL == (ftmp2 = H5F__efc_open(f1, filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp2 = H5F__efc_open(f1, filename[2], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, ftmp2) < 0)
FAIL_STACK_ERROR
- if (NULL == (ftmp3 = H5F__efc_open(f1, filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp3 = H5F__efc_open(f1, filename[3], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, ftmp3) < 0)
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f2, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f2, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f2, ftmp0) < 0)
FAIL_STACK_ERROR
- if (NULL == (ftmp1 = H5F__efc_open(f2, filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp1 = H5F__efc_open(f2, filename[1], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f2, ftmp1) < 0)
FAIL_STACK_ERROR
- if (NULL == (ftmp2 = H5F__efc_open(f2, filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp2 = H5F__efc_open(f2, filename[2], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f2, ftmp2) < 0)
FAIL_STACK_ERROR
- if (NULL == (ftmp3 = H5F__efc_open(f2, filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp3 = H5F__efc_open(f2, filename[3], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f2, ftmp3) < 0)
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f3, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f3, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f3, ftmp0) < 0)
FAIL_STACK_ERROR
- if (NULL == (ftmp1 = H5F__efc_open(f3, filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp1 = H5F__efc_open(f3, filename[1], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f3, ftmp1) < 0)
FAIL_STACK_ERROR
- if (NULL == (ftmp2 = H5F__efc_open(f3, filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp2 = H5F__efc_open(f3, filename[2], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f3, ftmp2) < 0)
FAIL_STACK_ERROR
- if (NULL == (ftmp3 = H5F__efc_open(f3, filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp3 = H5F__efc_open(f3, filename[3], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f3, ftmp3) < 0)
FAIL_STACK_ERROR
@@ -2289,10 +2186,9 @@ test_graph_cycle(void)
/* Test 25: File held open by EFC client interrupts cycle, with release */
if (NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
@@ -2322,17 +2218,15 @@ test_graph_cycle(void)
/* Test 26: File held open by EFC does not interrupt cycle, with release */
if (NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
if (H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
- if (NULL ==
- (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (f0->shared->nrefs != 2)
TEST_ERROR
@@ -2356,10 +2250,9 @@ test_graph_cycle(void)
* interrupt cycle, but parent file does (no valid way around it) */
if (NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
@@ -2367,10 +2260,9 @@ test_graph_cycle(void)
FAIL_STACK_ERROR
if (NULL == (f2 = H5F_open(filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (f1 = H5F__efc_open(f2, filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f2, filename[1], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f3 = H5F__efc_open(f1, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f3 = H5F__efc_open(f1, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (f0->shared->nrefs != 2)
TEST_ERROR
@@ -2470,10 +2362,9 @@ test_graph_cycle(void)
* release */
if (NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
@@ -2481,10 +2372,9 @@ test_graph_cycle(void)
FAIL_STACK_ERROR
if (NULL == (f2 = H5F_open(filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (f1 = H5F__efc_open(f2, filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f2, filename[1], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f3 = H5F__efc_open(f1, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f3 = H5F__efc_open(f1, filename[3], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (f0->shared->nrefs != 2)
TEST_ERROR
@@ -2550,12 +2440,11 @@ test_graph_cycle(void)
FAIL_STACK_ERROR
if (H5Pset_elink_file_cache_size(fapl_id, 0) < 0)
TEST_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (H5Pset_elink_file_cache_size(fapl_id, 8) < 0)
TEST_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (f0->shared->nrefs != 2)
TEST_ERROR
@@ -2586,10 +2475,9 @@ test_graph_cycle(void)
/* Test 30: File without EFC does not interrupt cycle */
if (NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if (NULL ==
- (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
- if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
+ if (NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fapl_id)))
FAIL_STACK_ERROR
if (H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
@@ -2597,8 +2485,7 @@ test_graph_cycle(void)
FAIL_STACK_ERROR
if (H5Pset_elink_file_cache_size(fapl_id, 0) < 0)
TEST_ERROR
- if (NULL ==
- (f2 = H5F__efc_open(f1, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
+ if (NULL == (f2 = H5F__efc_open(f1, filename[2], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fapl_id)))
FAIL_STACK_ERROR
if (H5Pset_elink_file_cache_size(fapl_id, 8) < 0)
TEST_ERROR
@@ -2651,73 +2538,89 @@ error:
int
main(void)
{
- unsigned nerrors = 0; /* track errors */
- H5P_genplist_t * plist; /* Property list pointer for FAPL */
- H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
- int i; /* iterator */
+ hid_t fapl_id = H5I_INVALID_HID;
+ hbool_t is_native; /* Whether native VOL connector is being used */
+ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ int i; /* iterator */
+ unsigned nerrors = 0; /* track errors */
/* Test Setup */
HDputs("Testing the external file cache");
/* Create property lists */
- fcpl_id = H5Pcreate(H5P_FILE_CREATE);
fapl_id = h5_fileaccess();
- /* Allocate memory for filenames */
- for (i = 0; i < N_FILENAMES; i++) {
- filename[i] = (char *)HDcalloc(PATH_MAX, sizeof(char));
- }
+ /* Check for operating with native (only) VOL connector */
+ is_native = FALSE;
+ if (H5VL_fapl_is_native(fapl_id, &is_native) < 0)
+ FAIL_STACK_ERROR;
- /* Patch filenames */
- h5_fixname(FILENAME[0], fapl_id, filename[0], PATH_MAX);
- h5_fixname(FILENAME[1], fapl_id, filename[1], PATH_MAX);
- h5_fixname(FILENAME[2], fapl_id, filename[2], PATH_MAX);
- h5_fixname(FILENAME[3], fapl_id, filename[3], PATH_MAX);
- h5_fixname(FILENAME[4], fapl_id, filename[4], PATH_MAX);
- h5_fixname(FILENAME[5], fapl_id, filename[5], PATH_MAX);
+ if (is_native) {
+ hid_t fcpl_id = H5I_INVALID_HID;
+ H5P_genplist_t * plist; /* Property list pointer for FAPL */
+ H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */
- /* Push API context */
- if (H5CX_push() < 0)
- FAIL_STACK_ERROR
- api_ctx_pushed = TRUE;
+ fcpl_id = H5Pcreate(H5P_FILE_CREATE);
- /* Get the VOL info from the fapl */
- plist = (H5P_genplist_t *)H5I_object(fapl_id);
- H5P_peek(plist, H5F_ACS_VOL_CONN_NAME, &connector_prop);
+ /* Allocate memory for filenames */
+ for (i = 0; i < N_FILENAMES; i++)
+ filename[i] = (char *)HDcalloc(PATH_MAX, sizeof(char));
- /* Stash a copy of the "top-level" connector property, before any pass-through
- * connectors modify or unwrap it.
- */
- H5CX_set_vol_connector_prop(&connector_prop);
+ /* Patch filenames */
+ h5_fixname(FILENAME[0], fapl_id, filename[0], PATH_MAX);
+ h5_fixname(FILENAME[1], fapl_id, filename[1], PATH_MAX);
+ h5_fixname(FILENAME[2], fapl_id, filename[2], PATH_MAX);
+ h5_fixname(FILENAME[3], fapl_id, filename[3], PATH_MAX);
+ h5_fixname(FILENAME[4], fapl_id, filename[4], PATH_MAX);
+ h5_fixname(FILENAME[5], fapl_id, filename[5], PATH_MAX);
- /* Test Functions */
- nerrors += test_single();
- nerrors += test_graph_nocycle();
- nerrors += test_graph_cycle();
+ /* Push API context */
+ if (H5CX_push() < 0)
+ FAIL_STACK_ERROR
+ api_ctx_pushed = TRUE;
- /* Close property lists */
- if (H5Pclose(fcpl_id) < 0)
- TEST_ERROR
+ /* Get the VOL info from the fapl */
+ plist = (H5P_genplist_t *)H5I_object(fapl_id);
+ H5P_peek(plist, H5F_ACS_VOL_CONN_NAME, &connector_prop);
- /* Verify symbol table messages are cached */
- nerrors += (h5_verify_cached_stabs(FILENAME, fapl_id) < 0 ? 1 : 0);
+ /* Stash a copy of the "top-level" connector property, before any pass-through
+ * connectors modify or unwrap it.
+ */
+ H5CX_set_vol_connector_prop(&connector_prop);
- /* Pop API context */
- if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
- FAIL_STACK_ERROR
- api_ctx_pushed = FALSE;
+ /* Test Functions */
+ nerrors += test_single(fapl_id, fcpl_id);
+ nerrors += test_graph_nocycle(fapl_id, fcpl_id);
+ nerrors += test_graph_cycle(fapl_id, fcpl_id);
- if (nerrors)
- goto error;
+ /* Close property lists */
+ if (H5Pclose(fcpl_id) < 0)
+ FAIL_STACK_ERROR
- HDputs("All external file cache tests passed.");
+ /* Verify symbol table messages are cached */
+ nerrors += (h5_verify_cached_stabs(FILENAME, fapl_id) < 0 ? 1 : 0);
- h5_clean_files(FILENAME, fapl_id);
+ /* Pop API context */
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
+ FAIL_STACK_ERROR
+ api_ctx_pushed = FALSE;
- for (i = 0; i < N_FILENAMES; i++) {
- HDfree(filename[i]);
- }
+ if (nerrors)
+ goto error;
+
+ HDputs("All external file cache tests passed.");
+
+ h5_clean_files(FILENAME, fapl_id);
+
+ for (i = 0; i < N_FILENAMES; i++)
+ HDfree(filename[i]);
+ } /* end if */
+ else {
+ HDputs("External file cache tests skipped - not using native VOL connector.");
+
+ if (H5Pclose(fapl_id) < 0)
+ FAIL_STACK_ERROR
+ } /* end else */
return EXIT_SUCCESS;
@@ -2733,9 +2636,8 @@ error:
if (api_ctx_pushed)
H5CX_pop(FALSE);
- for (i = 0; i < N_FILENAMES; i++) {
+ for (i = 0; i < N_FILENAMES; i++)
HDfree(filename[i]);
- }
return EXIT_FAILURE;
} /* end main() */
diff --git a/test/getname.c b/test/getname.c
index 485e3c1..aa1c726 100644
--- a/test/getname.c
+++ b/test/getname.c
@@ -3684,69 +3684,86 @@ test_elinks(hid_t fapl)
char name[NAME_BUF_SIZE]; /* Buffer for storing object's name */
ssize_t namelen; /* Length of object's name */
hbool_t name_cached; /* Indicate if name is cached */
+ hbool_t is_native; /* Whether native VOL connector is being used */
- /* Initialize the file names */
- h5_fixname(FILENAME[1], fapl, filename1, sizeof filename1);
- h5_fixname(FILENAME[2], fapl, filename2, sizeof filename2);
-
- /* Create files */
- if ((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- FAIL_STACK_ERROR
- if ((fid2 = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- FAIL_STACK_ERROR
+ TESTING("getting path to externally linked objects");
- /* Create a group in the second file */
- if ((group2 = H5Gcreate2(fid2, "Group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
-
- /* Close Group */
- if (H5Gclose(group2) < 0)
- FAIL_STACK_ERROR
-
- /* Create an external link in first file to the group in the second file */
- if (H5Lcreate_external(filename2, "Group2", fid1, "Link_to_Group2", H5P_DEFAULT, H5P_DEFAULT) < 0)
- FAIL_STACK_ERROR
-
- /* Create an external link in second file to the external link in the first file */
- if (H5Lcreate_external(filename1, "Link_to_Group2", fid2, "Link_to_Link_to_Group2", H5P_DEFAULT,
- H5P_DEFAULT) < 0)
- FAIL_STACK_ERROR
+ /* Check for operating with native (only) VOL connector */
+ is_native = FALSE;
+ if (H5VL_fapl_is_native(fapl, &is_native) < 0)
+ TEST_ERROR;
- /* Open the group in thesecond file through the external link */
- if ((group = H5Gopen2(fid1, "Link_to_Group2", H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ /* Skip tests for expanding external links when using non-native VOL connectors */
+ if (!is_native) {
+ SKIPPED();
+ HDputs(" Not using native VOL connector");
+ }
+ else {
+ /* Initialize the file names */
+ h5_fixname(FILENAME[1], fapl, filename1, sizeof filename1);
+ h5_fixname(FILENAME[2], fapl, filename2, sizeof filename2);
+
+ /* Create files */
+ if ((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ FAIL_STACK_ERROR
+ if ((fid2 = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Create a group in the second file */
+ if ((group2 = H5Gcreate2(fid2, "Group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Close Group */
+ if (H5Gclose(group2) < 0)
+ FAIL_STACK_ERROR
+
+ /* Create an external link in first file to the group in the second file */
+ if (H5Lcreate_external(filename2, "Group2", fid1, "Link_to_Group2", H5P_DEFAULT, H5P_DEFAULT) < 0)
+ FAIL_STACK_ERROR
+
+ /* Create an external link in second file to the external link in the first file */
+ if (H5Lcreate_external(filename1, "Link_to_Group2", fid2, "Link_to_Link_to_Group2", H5P_DEFAULT,
+ H5P_DEFAULT) < 0)
+ FAIL_STACK_ERROR
+
+ /* Open the group in the second file through the external link */
+ if ((group = H5Gopen2(fid1, "Link_to_Group2", H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Query the external link object's name */
+ *name = '\0';
+ name_cached = FALSE;
+ namelen = H5I__get_name_test(group, (char *)name, sizeof(name), &name_cached);
+ if (!((HDstrcmp(name, "/Group2") == 0) && (namelen == 7) && name_cached))
+ TEST_ERROR
- /* Query the external link object's name */
- *name = '\0';
- name_cached = FALSE;
- namelen = H5I__get_name_test(group, (char *)name, sizeof(name), &name_cached);
- if (!((HDstrcmp(name, "/Group2") == 0) && (namelen == 7) && name_cached))
- TEST_ERROR
+ /* Close Group */
+ if (H5Gclose(group) < 0)
+ FAIL_STACK_ERROR
- /* Close Group */
- if (H5Gclose(group) < 0)
- FAIL_STACK_ERROR
+ /* Open the group in the second file through the external link to the external link */
+ if ((group = H5Gopen2(fid2, "Link_to_Link_to_Group2", H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
- /* Open the group in the second file through the external link to the external link */
- if ((group = H5Gopen2(fid2, "Link_to_Link_to_Group2", H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ /* Query the external link to external link object's name */
+ *name = '\0';
+ name_cached = FALSE;
+ namelen = H5I__get_name_test(group, (char *)name, sizeof(name), &name_cached);
+ if (!((HDstrcmp(name, "/Group2") == 0) && (namelen == 7) && name_cached))
+ TEST_ERROR
- /* Query the external link to external link object's name */
- *name = '\0';
- name_cached = FALSE;
- namelen = H5I__get_name_test(group, (char *)name, sizeof(name), &name_cached);
- if (!((HDstrcmp(name, "/Group2") == 0) && (namelen == 7) && name_cached))
- TEST_ERROR
+ /* Close Group */
+ if (H5Gclose(group) < 0)
+ FAIL_STACK_ERROR
- /* Close Group */
- if (H5Gclose(group) < 0)
- FAIL_STACK_ERROR
+ /* Close files */
+ if (H5Fclose(fid1) < 0)
+ FAIL_STACK_ERROR
+ if (H5Fclose(fid2) < 0)
+ FAIL_STACK_ERROR
- /* Close files */
- if (H5Fclose(fid1) < 0)
- FAIL_STACK_ERROR
- if (H5Fclose(fid2) < 0)
- FAIL_STACK_ERROR
+ PASSED();
+ }
return 0;
diff --git a/test/links.c b/test/links.c
index e1a9dba..1c01b0f 100644
--- a/test/links.c
+++ b/test/links.c
@@ -16676,16 +16676,26 @@ error:
static int
obj_exists(hid_t fapl, hbool_t new_format)
{
- char filename[NAME_BUF_SIZE]; /* Buffer for file name */
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group ID */
- herr_t status; /* Generic return value */
+ char filename[NAME_BUF_SIZE]; /* Buffer for file name */
+ hid_t fid = -1; /* File ID */
+ hid_t gid = -1; /* Group ID */
+ hbool_t is_native; /* Whether native VOL connector is being used */
+ herr_t status; /* Generic return value */
if (new_format)
TESTING("object exists (w/new group format)")
else
TESTING("object exists")
+ /* Check for operating with native (only) VOL connector */
+ is_native = FALSE;
+ if (H5VL_fapl_is_native(fapl, &is_native) < 0)
+ TEST_ERROR;
+
+ /* Note that some testing will be skipped with non-native VOL connectors */
+ if (!is_native)
+ HDputs(" Tests involving external links skipped - not using native VOL connector");
+
/* Set up filename and create file*/
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
@@ -16778,8 +16788,10 @@ obj_exists(hid_t fapl, hbool_t new_format)
TEST_ERROR
/* Verify that H5Oexists_by_name() returns TRUE for external link in root group that points to object */
- if (TRUE != H5Oexists_by_name(fid, "external3", H5P_DEFAULT))
- TEST_ERROR
+ if (is_native) {
+ if (TRUE != H5Oexists_by_name(fid, "external3", H5P_DEFAULT))
+ TEST_ERROR
+ }
/* Create dangling (file doesn't exist) external link in non-root group */
if (H5Lcreate_external("nofile", "dangle", fid, "group/external1", H5P_DEFAULT, H5P_DEFAULT) < 0)
@@ -16805,8 +16817,10 @@ obj_exists(hid_t fapl, hbool_t new_format)
/* Verify that H5Oexists_by_name() returns TRUE for external link in non-root group that points to object
*/
- if (TRUE != H5Oexists_by_name(fid, "group/external3", H5P_DEFAULT))
- TEST_ERROR
+ if (is_native) {
+ if (TRUE != H5Oexists_by_name(fid, "group/external3", H5P_DEFAULT))
+ TEST_ERROR
+ }
/* Soft->External links */
/* Create soft-link in root group that points to dangling (file doesn't exist) external link */
@@ -16830,8 +16844,10 @@ obj_exists(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR
/* Verify that H5Oexists_by_name() returns TRUE */
- if (TRUE != H5Oexists_by_name(fid, "soft-elink3", H5P_DEFAULT))
- TEST_ERROR
+ if (is_native) {
+ if (TRUE != H5Oexists_by_name(fid, "soft-elink3", H5P_DEFAULT))
+ TEST_ERROR
+ }
/* Create soft-link in root group that points to dangling (file doesn't exist) external link in non-root
* group */
@@ -16856,8 +16872,10 @@ obj_exists(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR
/* Verify that H5Oexists_by_name() returns TRUE */
- if (TRUE != H5Oexists_by_name(fid, "soft-elink6", H5P_DEFAULT))
- TEST_ERROR
+ if (is_native) {
+ if (TRUE != H5Oexists_by_name(fid, "soft-elink6", H5P_DEFAULT))
+ TEST_ERROR
+ }
/* Create soft-link in non-root group that points to dangling (file doesn't exist) external link */
if (H5Lcreate_soft("/external1", fid, "group/soft-elink1", H5P_DEFAULT, H5P_DEFAULT) < 0)
@@ -16880,8 +16898,10 @@ obj_exists(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR
/* Verify that H5Oexists_by_name() returns TRUE */
- if (TRUE != H5Oexists_by_name(fid, "group/soft-elink3", H5P_DEFAULT))
- TEST_ERROR
+ if (is_native) {
+ if (TRUE != H5Oexists_by_name(fid, "group/soft-elink3", H5P_DEFAULT))
+ TEST_ERROR
+ }
/* Create soft-link in non-root group that points to dangling (file doesn't exist) external link in
* non-root group */
@@ -16907,8 +16927,10 @@ obj_exists(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR
/* Verify that H5Oexists_by_name() returns TRUE */
- if (TRUE != H5Oexists_by_name(fid, "group/soft-elink6", H5P_DEFAULT))
- TEST_ERROR
+ if (is_native) {
+ if (TRUE != H5Oexists_by_name(fid, "group/soft-elink6", H5P_DEFAULT))
+ TEST_ERROR
+ }
/* External->Soft links */
/* Create external link in root group that points to dangling soft link in root group */
@@ -16924,8 +16946,10 @@ obj_exists(hid_t fapl, hbool_t new_format)
TEST_ERROR
/* Verify that H5Oexists_by_name() returns TRUE */
- if (TRUE != H5Oexists_by_name(fid, "elink-soft2", H5P_DEFAULT))
- TEST_ERROR
+ if (is_native) {
+ if (TRUE != H5Oexists_by_name(fid, "elink-soft2", H5P_DEFAULT))
+ TEST_ERROR
+ }
/* Create external link in root group that points to dangling soft link in non-root group */
if (H5Lcreate_external(filename, "group/soft1", fid, "elink-soft3", H5P_DEFAULT, H5P_DEFAULT) < 0)
@@ -16940,8 +16964,10 @@ obj_exists(hid_t fapl, hbool_t new_format)
TEST_ERROR
/* Verify that H5Oexists_by_name() returns TRUE */
- if (TRUE != H5Oexists_by_name(fid, "elink-soft4", H5P_DEFAULT))
- TEST_ERROR
+ if (is_native) {
+ if (TRUE != H5Oexists_by_name(fid, "elink-soft4", H5P_DEFAULT))
+ TEST_ERROR
+ }
/* Create external link in non-root group that points to dangling soft link in root group */
if (H5Lcreate_external(filename, "soft1", fid, "group/elink-soft1", H5P_DEFAULT, H5P_DEFAULT) < 0)
@@ -16956,8 +16982,10 @@ obj_exists(hid_t fapl, hbool_t new_format)
TEST_ERROR
/* Verify that H5Oexists_by_name() returns TRUE */
- if (TRUE != H5Oexists_by_name(fid, "group/elink-soft2", H5P_DEFAULT))
- TEST_ERROR
+ if (is_native) {
+ if (TRUE != H5Oexists_by_name(fid, "group/elink-soft2", H5P_DEFAULT))
+ TEST_ERROR
+ }
/* Create external link in non-root group that points to dangling soft link in non-root group */
if (H5Lcreate_external(filename, "group/soft1", fid, "group/elink-soft3", H5P_DEFAULT, H5P_DEFAULT) < 0)
@@ -16973,8 +17001,10 @@ obj_exists(hid_t fapl, hbool_t new_format)
TEST_ERROR
/* Verify that H5Oexists_by_name() returns TRUE */
- if (TRUE != H5Oexists_by_name(fid, "group/elink-soft4", H5P_DEFAULT))
- TEST_ERROR
+ if (is_native) {
+ if (TRUE != H5Oexists_by_name(fid, "group/elink-soft4", H5P_DEFAULT))
+ TEST_ERROR
+ }
/* Close file created */
if (H5Fclose(fid) < 0)
@@ -22578,7 +22608,8 @@ main(void)
}
for (new_format = FALSE; new_format <= TRUE; new_format++) {
- hid_t my_fapl;
+ hid_t my_fapl;
+ hbool_t is_native; /* Whether native VOL connector is being used */
/* Check for FAPL to use */
if (new_format) {
@@ -22618,9 +22649,21 @@ main(void)
nerrors += test_deprec(my_fapl, new_format);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
- /* Skip external link tests for splitter VFD, which has external link-related bugs */
- if (HDstrcmp(env_h5_drvr, "splitter")) {
+ /* Check for operating with native (only) VOL connector */
+ is_native = FALSE;
+ if (H5VL_fapl_is_native(my_fapl, &is_native) < 0)
+ TEST_ERROR;
+ /* Skip tests external link tests when using non-native VOL connectors */
+ if (!is_native || 0 == HDstrcmp(env_h5_drvr, "splitter")) {
+ HDputs(" External link tests skipped - not using native VOL connector, or using splitter "
+ "VFD");
+ }
+ else if (HDstrcmp(env_h5_drvr, "splitter") == 0) {
+ HDputs(" External link tests skipped - splitter VFD does not currently support external "
+ "links");
+ }
+ else {
/* tests for external link */
/* Test external file cache first, so it sees the default efc setting on the fapl
*/
@@ -22672,7 +22715,10 @@ main(void)
nerrors += external_link_closing_deprec(my_fapl, new_format) < 0 ? 1 : 0;
#endif /* H5_NO_DEPRECATED_SYMBOLS */
- if (!driver_uses_modified_filename) {
+ if (driver_uses_modified_filename) {
+ HDputs(" external_link_endian() test skipped - driver uses modified filename");
+ }
+ else {
nerrors += external_link_endian(new_format) < 0 ? 1 : 0;
}
@@ -22687,7 +22733,10 @@ main(void)
nerrors += external_link_reltar(my_fapl, new_format) < 0 ? 1 : 0;
nerrors += external_link_chdir(my_fapl, new_format) < 0 ? 1 : 0;
- if (!driver_uses_modified_filename) {
+ if (driver_uses_modified_filename) {
+ HDputs(" external_set_elink_fapl1() test skipped - driver uses modified filename");
+ }
+ else {
nerrors += external_set_elink_fapl1(my_fapl, new_format) < 0 ? 1 : 0;
}
diff --git a/test/links_env.c b/test/links_env.c
index 7170132..8c1567d 100644
--- a/test/links_env.c
+++ b/test/links_env.c
@@ -56,76 +56,90 @@ static int external_link_env(hid_t fapl, hbool_t new_format);
static int
external_link_env(hid_t fapl, hbool_t new_format)
{
- hid_t fid = (-1); /* File ID */
- hid_t gid = (-1); /* Group IDs */
- const char *envval = NULL; /* Pointer to environment variable */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
+ const char *envval = NULL; /* Pointer to environment variable */
char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE],
filename3[NAME_BUF_SIZE]; /* Holders for filename */
+ hbool_t is_native; /* Whether native VOL connector is being used */
if (new_format)
TESTING("external links via environment variable (w/new group format)")
else
TESTING("external links via environment variable")
- if ((envval = HDgetenv("HDF5_EXT_PREFIX")) == NULL)
- envval = "nomatch";
- if (HDstrcmp(envval, ".:tmp_links_env") != 0)
- TEST_ERROR
-
- /* Set up name for main file:"extlinks_env0" */
- h5_fixname(FILENAME[0], fapl, filename1, sizeof filename1);
-
- /* Set up name for external linked target file: "extlinks_env1" */
- h5_fixname(FILENAME[1], fapl, filename2, sizeof filename2);
-
- /* Create "tmp_links_env" directory */
- if (HDmkdir(TMPDIR, (mode_t)0755) < 0 && errno != EEXIST)
- TEST_ERROR
-
- /* Set up name (location) for the target file: "tmp_links_env/extlinks1" */
- h5_fixname(FILENAME[2], fapl, filename3, sizeof filename3);
-
- /* Create the target file in "tmp_links_env" directory */
- if ((fid = H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
- if ((gid = H5Gcreate2(fid, "A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
-
- /* Closing for target file */
- if (H5Gclose(gid) < 0)
- TEST_ERROR
- if (H5Fclose(fid) < 0)
- TEST_ERROR
+ /* Check for operating with native (only) VOL connector */
+ is_native = FALSE;
+ if (H5VL_fapl_is_native(fapl, &is_native) < 0)
+ TEST_ERROR;
- /* Create the main file */
- if ((fid = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
-
- /* Create external link to target file */
- if (H5Lcreate_external(filename2, "/A", fid, "ext_link", H5P_DEFAULT, H5P_DEFAULT) < 0)
- TEST_ERROR
-
- /* Open object through external link */
- H5E_BEGIN_TRY
- {
- gid = H5Gopen2(fid, "ext_link", H5P_DEFAULT);
+ /* Skip tests when using non-native VOL connectors */
+ if (!is_native) {
+ SKIPPED();
+ HDputs(" Not using native VOL connector");
}
- H5E_END_TRY;
-
- /* Should be able to find the target file from pathnames set via HDF5_EXT_PREFIX */
- if (gid < 0) {
- H5_FAILED();
- HDputs(" Should have found the file in tmp_links_env directory.");
- goto error;
+ else {
+ if ((envval = HDgetenv("HDF5_EXT_PREFIX")) == NULL)
+ envval = "nomatch";
+ if (HDstrcmp(envval, ".:tmp_links_env") != 0)
+ TEST_ERROR
+
+ /* Set up name for main file:"extlinks_env0" */
+ h5_fixname(FILENAME[0], fapl, filename1, sizeof filename1);
+
+ /* Set up name for external linked target file: "extlinks_env1" */
+ h5_fixname(FILENAME[1], fapl, filename2, sizeof filename2);
+
+ /* Create "tmp_links_env" directory */
+ if (HDmkdir(TMPDIR, (mode_t)0755) < 0 && errno != EEXIST)
+ TEST_ERROR
+
+ /* Set up name (location) for the target file: "tmp_links_env/extlinks1" */
+ h5_fixname(FILENAME[2], fapl, filename3, sizeof filename3);
+
+ /* Create the target file in "tmp_links_env" directory */
+ if ((fid = H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ TEST_ERROR
+ if ((gid = H5Gcreate2(fid, "A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ TEST_ERROR
+
+ /* Closing for target file */
+ if (H5Gclose(gid) < 0)
+ TEST_ERROR
+ if (H5Fclose(fid) < 0)
+ TEST_ERROR
+
+ /* Create the main file */
+ if ((fid = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ TEST_ERROR
+
+ /* Create external link to target file */
+ if (H5Lcreate_external(filename2, "/A", fid, "ext_link", H5P_DEFAULT, H5P_DEFAULT) < 0)
+ TEST_ERROR
+
+ /* Open object through external link */
+ H5E_BEGIN_TRY
+ {
+ gid = H5Gopen2(fid, "ext_link", H5P_DEFAULT);
+ }
+ H5E_END_TRY;
+
+ /* Should be able to find the target file from pathnames set via HDF5_EXT_PREFIX */
+ if (gid < 0) {
+ H5_FAILED();
+ HDputs(" Should have found the file in tmp_links_env directory.");
+ goto error;
+ }
+
+ /* closing for main file */
+ if (H5Gclose(gid) < 0)
+ TEST_ERROR
+ if (H5Fclose(fid) < 0)
+ TEST_ERROR
+
+ PASSED();
}
- /* closing for main file */
- if (H5Gclose(gid) < 0)
- TEST_ERROR
- if (H5Fclose(fid) < 0)
- TEST_ERROR
-
- PASSED();
return 0;
error:
diff --git a/test/objcopy.c b/test/objcopy.c
index 911a45b..9f98cf9 100644
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -8339,13 +8339,13 @@ error:
static int
test_copy_group_links(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1, fid_ext = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t plid = -1; /* Object copy plist ID */
- hsize_t dim2d[2];
- hsize_t dim1d[1];
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID, fid_ext = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t plid = H5I_INVALID_HID; /* Object copy plist ID */
+ hsize_t dim2d[2];
+ hsize_t dim1d[1];
H5L_info2_t linfo;
int buf[DIM_SIZE_1][DIM_SIZE_2];
int i, j;
@@ -8483,8 +8483,20 @@ test_copy_group_links(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_
copy_options = 0;
if (expand_soft)
copy_options |= H5O_COPY_EXPAND_SOFT_LINK_FLAG;
- if (expand_ext)
+ if (expand_ext) {
+ hbool_t is_native; /* Whether native VOL connector is being used */
+
+ /* Check for operating with native (only) VOL connector */
+ is_native = FALSE;
+ if (H5VL_fapl_is_native(src_fapl, &is_native) < 0)
+ TEST_ERROR;
+
+ /* Skip test for expanding external links when non-native VOL connector is used */
+ HDputs(" Skipping external link expansion sub-test - not using native VOL connector");
+ continue;
+
copy_options |= H5O_COPY_EXPAND_EXT_LINK_FLAG;
+ } /* end if */
if (H5Pset_copy_object(plid, copy_options) < 0)
TEST_ERROR
@@ -8826,138 +8838,151 @@ error:
static int
test_copy_ext_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1, fid_ext = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t gid = -1; /* Group ID */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID, fid_ext = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
hsize_t dim2d[2];
int buf[DIM_SIZE_1][DIM_SIZE_2];
int i, j;
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
char ext_filename[NAME_BUF_SIZE];
+ hbool_t is_native; /* Whether native VOL connector is being used */
TESTING("H5Ocopy(): object through external link");
- /* set initial data values */
- for (i = 0; i < DIM_SIZE_1; i++)
- for (j = 0; j < DIM_SIZE_2; j++)
- buf[i][j] = 10000 + 100 * i + j;
+ /* Check for operating with native (only) VOL connector */
+ is_native = FALSE;
+ if (H5VL_fapl_is_native(src_fapl, &is_native) < 0)
+ TEST_ERROR;
- /* Initialize the filenames */
- h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename);
- h5_fixname(FILENAME[1], src_fapl, dst_filename, sizeof dst_filename);
- h5_fixname(FILENAME[2], dst_fapl, ext_filename, sizeof ext_filename);
+ if (is_native) {
+ /* set initial data values */
+ for (i = 0; i < DIM_SIZE_1; i++)
+ for (j = 0; j < DIM_SIZE_2; j++)
+ buf[i][j] = 10000 + 100 * i + j;
- /* Reset file token checking info */
- token_reset();
+ /* Initialize the filenames */
+ h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename);
+ h5_fixname(FILENAME[1], src_fapl, dst_filename, sizeof dst_filename);
+ h5_fixname(FILENAME[2], dst_fapl, ext_filename, sizeof ext_filename);
- /* create source file */
- if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0)
- TEST_ERROR
+ /* Reset file token checking info */
+ token_reset();
- /* create group at the SRC file */
- if ((gid = H5Gcreate2(fid_src, NAME_GROUP_LINK, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ /* create source file */
+ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0)
+ TEST_ERROR
- /* attach attributes to the group */
- if (test_copy_attach_attributes(gid, H5T_NATIVE_INT) < 0)
- 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
- /* Set dataspace dimensions */
- dim2d[0] = DIM_SIZE_1;
- dim2d[1] = DIM_SIZE_2;
+ /* attach attributes to the group */
+ if (test_copy_attach_attributes(gid, H5T_NATIVE_INT) < 0)
+ TEST_ERROR
- /* create dataspace */
- if ((sid = H5Screate_simple(2, dim2d, NULL)) < 0)
- TEST_ERROR
+ /* Set dataspace dimensions */
+ dim2d[0] = DIM_SIZE_1;
+ dim2d[1] = DIM_SIZE_2;
- /* 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
- if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
- TEST_ERROR
+ /* create dataspace */
+ if ((sid = H5Screate_simple(2, dim2d, NULL)) < 0)
+ TEST_ERROR
- /* close dataspace */
- if (H5Sclose(sid) < 0)
- TEST_ERROR
- /* close the dataset */
- if (H5Dclose(did) < 0)
- TEST_ERROR
- /* close the group */
- if (H5Gclose(gid) < 0)
- 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
+ if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
+ 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
+ /* close dataspace */
+ if (H5Sclose(sid) < 0)
+ TEST_ERROR
+ /* close the dataset */
+ if (H5Dclose(did) < 0)
+ TEST_ERROR
+ /* close the group */
+ if (H5Gclose(gid) < 0)
+ 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
+ /* 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
- /* 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
+ /* 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
- /* close the group and file */
- if (H5Gclose(gid) < 0)
- TEST_ERROR
- if (H5Fclose(fid_ext) < 0)
- 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
- /* open the "extern" file with read-only */
- if ((fid_ext = H5Fopen(ext_filename, H5F_ACC_RDONLY, src_fapl)) < 0)
- TEST_ERROR
+ /* close the group and file */
+ if (H5Gclose(gid) < 0)
+ TEST_ERROR
+ if (H5Fclose(fid_ext) < 0)
+ TEST_ERROR
- /* create destination file */
- if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0)
- TEST_ERROR
+ /* open the "extern" file with read-only */
+ if ((fid_ext = H5Fopen(ext_filename, H5F_ACC_RDONLY, src_fapl)) < 0)
+ 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
+ /* create destination file */
+ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0)
+ 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
+ /* 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
- /* open the dataset through the external link */
- if ((did = H5Dopen2(fid_ext, NAME_LINK_EXTERN, H5P_DEFAULT)) < 0)
- 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
- /* open the destination dataset */
- if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ /* open the dataset through the external link */
+ if ((did = H5Dopen2(fid_ext, NAME_LINK_EXTERN, H5P_DEFAULT)) < 0)
+ TEST_ERROR
- /* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
- TEST_ERROR
+ /* open the destination dataset */
+ if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0)
+ TEST_ERROR
- /* close the destination dataset */
- if (H5Dclose(did2) < 0)
- TEST_ERROR
+ /* Check if the datasets are equal */
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ TEST_ERROR
- /* close the source dataset */
- if (H5Dclose(did) < 0)
- TEST_ERROR
+ /* close the destination dataset */
+ if (H5Dclose(did2) < 0)
+ TEST_ERROR
- /* close the SRC file */
- if (H5Fclose(fid_src) < 0)
- TEST_ERROR
+ /* close the source dataset */
+ if (H5Dclose(did) < 0)
+ TEST_ERROR
- /* close the EXT file */
- if (H5Fclose(fid_ext) < 0)
- TEST_ERROR
+ /* close the SRC file */
+ if (H5Fclose(fid_src) < 0)
+ TEST_ERROR
- /* close the DST file */
- if (H5Fclose(fid_dst) < 0)
- TEST_ERROR
+ /* close the EXT file */
+ if (H5Fclose(fid_ext) < 0)
+ TEST_ERROR
+
+ /* close the DST file */
+ if (H5Fclose(fid_dst) < 0)
+ TEST_ERROR
+
+ PASSED();
+ }
+ else {
+ SKIPPED();
+ HDputs(" Not using native VOL connector");
+ }
- PASSED();
return 0;
error:
@@ -16498,338 +16523,354 @@ test_copy_option(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
int i, j;
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
+ hbool_t is_native; /* Whether native VOL connector is being used */
TESTING(test_desciption);
- /* set initial data values */
- for (i = 0; i < DIM_SIZE_1; i++)
- for (j = 0; j < DIM_SIZE_2; j++)
- buf[i][j] = 10000 + 100 * i + j;
-
- /* Initialize the filenames */
- h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename);
- h5_fixname(FILENAME[1], dst_fapl, dst_filename, sizeof dst_filename);
-
- /* Reset file token checking info */
- token_reset();
-
- /* create source file */
- 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_TOP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
-
- /* attach attributes to the group */
- if (test_copy_attach_attributes(gid, H5T_NATIVE_INT) < 0)
- TEST_ERROR
-
- /* Set dataspace dimensions */
- dim2d[0] = DIM_SIZE_1;
- dim2d[1] = DIM_SIZE_2;
+ /* Check for operating with native (only) VOL connector */
+ is_native = FALSE;
+ if (H5VL_fapl_is_native(src_fapl, &is_native) < 0)
+ TEST_ERROR;
- /* create dataspace */
- if ((sid = H5Screate_simple(2, dim2d, NULL)) < 0)
- 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
- if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
- TEST_ERROR
- if (H5Dclose(did) < 0)
- TEST_ERROR
-
- /* create a sub-group */
- if ((gid_sub = H5Gcreate2(fid_src, NAME_GROUP_SUB, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- 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
- if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
- TEST_ERROR
- if (H5Dclose(did) < 0)
- 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
-
- /* 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
- if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
- TEST_ERROR
-
- /* close dataset */
- if (H5Dclose(did) < 0)
- TEST_ERROR
-
- /* close dataspace */
- if (H5Sclose(sid) < 0)
- TEST_ERROR
+ /* Skip tests for expanding external links when using non-native VOL connectors */
+ if (!is_native && (flag & H5O_COPY_EXPAND_EXT_LINK_FLAG)) {
+ SKIPPED();
+ HDputs(" Not using native VOL connector");
+ }
+ else {
+ /* set initial data values */
+ for (i = 0; i < DIM_SIZE_1; i++)
+ for (j = 0; j < DIM_SIZE_2; j++)
+ buf[i][j] = 10000 + 100 * i + j;
- if (H5Gclose(gid_sub_sub) < 0)
- TEST_ERROR
+ /* Initialize the filenames */
+ h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename);
+ h5_fixname(FILENAME[1], dst_fapl, dst_filename, sizeof dst_filename);
- if (H5Gclose(gid_sub) < 0)
- TEST_ERROR
+ /* Reset file token checking info */
+ token_reset();
- /* close the group */
- if (H5Gclose(gid) < 0)
- 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
- if (H5Lcreate_soft(NAME_DATASET_SUB_SUB, fid_src, NAME_LINK_SOFT, H5P_DEFAULT, H5P_DEFAULT) < 0)
- FAIL_STACK_ERROR
- if (H5Lcreate_soft("nowhere", fid_src, NAME_LINK_SOFT_DANGLE, H5P_DEFAULT, H5P_DEFAULT) < 0)
- FAIL_STACK_ERROR
- if (H5Gclose(gid) < 0)
- FAIL_STACK_ERROR
+ /* create source file */
+ if ((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0)
+ TEST_ERROR
- /* Create group to compare with */
- if ((gid = H5Gcreate2(fid_src, NAME_GROUP_LINK2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- 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
- if (H5Lcreate_soft("nowhere", fid_src, NAME_LINK_SOFT_DANGLE2, H5P_DEFAULT, H5P_DEFAULT) < 0)
- FAIL_STACK_ERROR
- if (H5Gclose(gid) < 0)
- FAIL_STACK_ERROR
- } /* end if */
+ /* create group at the SRC file */
+ if ((gid = H5Gcreate2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ TEST_ERROR
- if ((flag & H5O_COPY_EXPAND_EXT_LINK_FLAG) > 0) {
- char ext_filename[NAME_BUF_SIZE];
+ /* attach attributes to the group */
+ if (test_copy_attach_attributes(gid, H5T_NATIVE_INT) < 0)
+ TEST_ERROR
- h5_fixname(FILENAME[2], src_fapl, ext_filename, sizeof ext_filename);
+ /* Set dataspace dimensions */
+ dim2d[0] = DIM_SIZE_1;
+ dim2d[1] = DIM_SIZE_2;
- /* Create the external file and dataset */
- if ((fid_ext = H5Fcreate(ext_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0)
- TEST_ERROR
+ /* create dataspace */
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,
+
+ /* 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
if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
TEST_ERROR
if (H5Dclose(did) < 0)
TEST_ERROR
- if (H5Fclose(fid_ext) < 0)
- 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
- } /* end if */
- else if ((gid = H5Gopen2(fid_src, NAME_GROUP_LINK, H5P_DEFAULT)) < 0)
+ /* create a sub-group */
+ if ((gid_sub = H5Gcreate2(fid_src, NAME_GROUP_SUB, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if (H5Lcreate_external(ext_filename, NAME_DATASET_SIMPLE, fid_src, NAME_LINK_EXTERN, H5P_DEFAULT,
- H5P_DEFAULT) < 0)
+
+ /* 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
- if (H5Lcreate_external("no_file", "no_object", fid_src, NAME_LINK_EXTERN_DANGLE, H5P_DEFAULT,
- H5P_DEFAULT) < 0)
+ if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
TEST_ERROR
- if (H5Gclose(gid) < 0)
+ if (H5Dclose(did) < 0)
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
- } /* end if */
- else if ((gid = H5Gopen2(fid_src, NAME_GROUP_LINK2, H5P_DEFAULT)) < 0)
+ /* create sub-sub-group */
+ if ((gid_sub_sub = H5Gcreate2(gid_sub, NAME_GROUP_SUB_SUB2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
+ 0)
TEST_ERROR
- if ((did = H5Dcreate2(fid_src, NAME_LINK_EXTERN2, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT,
+
+ /* 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
if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
TEST_ERROR
- if (H5Lcreate_external("no_file", "no_object", fid_src, NAME_LINK_EXTERN_DANGLE2, H5P_DEFAULT,
- H5P_DEFAULT) < 0)
- TEST_ERROR
+
+ /* close dataset */
if (H5Dclose(did) < 0)
TEST_ERROR
- if (H5Gclose(gid) < 0)
- TEST_ERROR
- /* Close dataspace */
+ /* close dataspace */
if (H5Sclose(sid) < 0)
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)
+ if (H5Gclose(gid_sub_sub) < 0)
TEST_ERROR
- /* create an attribute of object references */
- if (attach_ref_attr(fid_src, gid_ref) < 0)
+ if (H5Gclose(gid_sub) < 0)
TEST_ERROR
- /* create an attribute of region references */
- if (attach_reg_ref_attr(fid_src, gid_ref) < 0)
- TEST_ERROR
+ /* close the group */
+ if (H5Gclose(gid) < 0)
+ FAIL_STACK_ERROR
- /* create a dataset of region references */
- if (create_reg_ref_dataset(fid_src, gid_ref) < 0)
- TEST_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
+ if (H5Lcreate_soft(NAME_DATASET_SUB_SUB, fid_src, NAME_LINK_SOFT, H5P_DEFAULT, H5P_DEFAULT) < 0)
+ FAIL_STACK_ERROR
+ if (H5Lcreate_soft("nowhere", fid_src, NAME_LINK_SOFT_DANGLE, H5P_DEFAULT, H5P_DEFAULT) < 0)
+ FAIL_STACK_ERROR
+ if (H5Gclose(gid) < 0)
+ FAIL_STACK_ERROR
- /* Close group holding reference objects */
- if (H5Gclose(gid_ref) < 0)
- TEST_ERROR
- } /* end if */
+ /* Create group to compare with */
+ if ((gid = H5Gcreate2(fid_src, NAME_GROUP_LINK2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ 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
+ if (H5Lcreate_soft("nowhere", fid_src, NAME_LINK_SOFT_DANGLE2, H5P_DEFAULT, H5P_DEFAULT) < 0)
+ FAIL_STACK_ERROR
+ if (H5Gclose(gid) < 0)
+ FAIL_STACK_ERROR
+ } /* end if */
- /* close the SRC file */
- if (H5Fclose(fid_src) < 0)
- TEST_ERROR
+ if ((flag & H5O_COPY_EXPAND_EXT_LINK_FLAG) > 0) {
+ char ext_filename[NAME_BUF_SIZE];
- /* 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
- } /* end if */
- else if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0)
- TEST_ERROR
+ h5_fixname(FILENAME[2], src_fapl, ext_filename, sizeof ext_filename);
- /* create destination file */
- if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0)
- TEST_ERROR
+ /* Create the external file and dataset */
+ 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
+ if (H5Dclose(did) < 0)
+ TEST_ERROR
+ if (H5Fclose(fid_ext) < 0)
+ 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
+ /* 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
+ } /* end if */
+ else if ((gid = H5Gopen2(fid_src, NAME_GROUP_LINK, H5P_DEFAULT)) < 0)
+ TEST_ERROR
+ if (H5Lcreate_external(ext_filename, NAME_DATASET_SIMPLE, fid_src, NAME_LINK_EXTERN, H5P_DEFAULT,
+ H5P_DEFAULT) < 0)
+ TEST_ERROR
+ if (H5Lcreate_external("no_file", "no_object", fid_src, NAME_LINK_EXTERN_DANGLE, H5P_DEFAULT,
+ H5P_DEFAULT) < 0)
+ TEST_ERROR
+ if (H5Gclose(gid) < 0)
+ TEST_ERROR
- /* create property to pass copy options */
- if ((pid = H5Pcreate(H5P_OBJECT_COPY)) < 0)
- 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
+ } /* end if */
+ else if ((gid = H5Gopen2(fid_src, NAME_GROUP_LINK2, H5P_DEFAULT)) < 0)
+ TEST_ERROR
+ if ((did = H5Dcreate2(fid_src, NAME_LINK_EXTERN2, 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
+ if (H5Lcreate_external("no_file", "no_object", fid_src, NAME_LINK_EXTERN_DANGLE2, H5P_DEFAULT,
+ H5P_DEFAULT) < 0)
+ TEST_ERROR
+ if (H5Dclose(did) < 0)
+ TEST_ERROR
+ if (H5Gclose(gid) < 0)
+ TEST_ERROR
- /* set options for object copy */
- if (H5Pset_copy_object(pid, flag) < 0)
- TEST_ERROR
+ /* Close dataspace */
+ if (H5Sclose(sid) < 0)
+ TEST_ERROR
+ } /* end if */
- /* Verify object copy flags */
- if (H5Pget_copy_object(pid, &cpy_flags) < 0)
- TEST_ERROR
- if (cpy_flags != flag)
- TEST_ERROR
+ 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
- /* 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)
+ /* create an attribute of object references */
+ if (attach_ref_attr(fid_src, gid_ref) < 0)
+ TEST_ERROR
+
+ /* create an attribute of region references */
+ if (attach_reg_ref_attr(fid_src, gid_ref) < 0)
+ TEST_ERROR
+
+ /* create a dataset of region references */
+ if (create_reg_ref_dataset(fid_src, gid_ref) < 0)
+ TEST_ERROR
+
+ /* Close group holding reference objects */
+ if (H5Gclose(gid_ref) < 0)
+ TEST_ERROR
+ } /* end if */
+
+ /* close the SRC file */
+ if (H5Fclose(fid_src) < 0)
TEST_ERROR
- if (H5Pset_create_intermediate_group(lcpl_id, TRUE) < 0)
+
+ /* 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
+ } /* end if */
+ else if ((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0)
TEST_ERROR
- if (H5Ocopy(fid_src, NAME_GROUP_TOP, fid_dst, "/new_g0/new_g00", pid, lcpl_id) < 0)
+ /* create destination file */
+ if ((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0)
TEST_ERROR
- if (H5Pclose(lcpl_id) < 0)
+ /* 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
- /* open the group for copy */
- if ((gid = H5Gopen2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ /* create property to pass copy options */
+ if ((pid = H5Pcreate(H5P_OBJECT_COPY)) < 0)
+ TEST_ERROR
- /* open the destination group */
- if ((gid2 = H5Gopen2(fid_dst, "/new_g0/new_g00", H5P_DEFAULT)) < 0)
- 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)
+ /* set options for object copy */
+ if (H5Pset_copy_object(pid, flag) < 0)
+ TEST_ERROR
+
+ /* Verify object copy flags */
+ if (H5Pget_copy_object(pid, &cpy_flags) < 0)
TEST_ERROR
+ if (cpy_flags != flag)
+ 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
+ if (H5Pset_create_intermediate_group(lcpl_id, TRUE) < 0)
+ TEST_ERROR
+
+ if (H5Ocopy(fid_src, NAME_GROUP_TOP, fid_dst, "/new_g0/new_g00", pid, lcpl_id) < 0)
+ TEST_ERROR
+
+ if (H5Pclose(lcpl_id) < 0)
+ 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)
+ /* open the group for copy */
+ if ((gid = H5Gopen2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
- /* open the group for copy */
- if ((gid = H5Gopen2(fid_src, NAME_GROUP_LINK2, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ /* open the destination group */
+ if ((gid2 = H5Gopen2(fid_dst, "/new_g0/new_g00", H5P_DEFAULT)) < 0)
+ 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
- /* open the destination group */
- if ((gid2 = H5Gopen2(fid_dst, NAME_GROUP_LINK, H5P_DEFAULT)) < 0)
- 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
+ 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
- /* open the group for copy */
- if ((gid = H5Gopen2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ /* open the group for copy */
+ if ((gid = H5Gopen2(fid_src, NAME_GROUP_LINK2, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
- /* open the destination group */
- if ((gid2 = H5Gopen2(fid_dst, NAME_GROUP_TOP, H5P_DEFAULT)) < 0)
- 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
+ /* open the destination group */
+ if ((gid2 = H5Gopen2(fid_dst, NAME_GROUP_LINK, H5P_DEFAULT)) < 0)
+ 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
- /* open the group for copy */
- if ((gid = H5Gopen2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ /* open the group for copy */
+ if ((gid = H5Gopen2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
- /* open the destination group */
- if ((gid2 = H5Gopen2(fid_dst, NAME_GROUP_TOP, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ /* open the destination group */
+ if ((gid2 = H5Gopen2(fid_dst, NAME_GROUP_TOP, H5P_DEFAULT)) < 0)
+ 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
- /* 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
+ /* open the group for copy */
+ if ((gid = H5Gopen2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
- /* open the group for copy */
- if ((gid = H5Gopen2(fid_src, NAME_GROUP_REF, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ /* open the destination group */
+ if ((gid2 = H5Gopen2(fid_dst, NAME_GROUP_TOP, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
- /* open the destination group */
- if ((gid2 = H5Gopen2(fid_dst, NAME_GROUP_REF, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
- }
- else {
- /* Unknown flag */
- TEST_ERROR
- } /* end else */
+ /* 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
- /* Check if the groups are equal */
- if (compare_groups(gid, gid2, pid, depth, flag) != TRUE)
- TEST_ERROR
- if (H5Gclose(gid2) < 0)
- TEST_ERROR
- if (H5Gclose(gid) < 0)
- TEST_ERROR
+ /* open the group for copy */
+ if ((gid = H5Gopen2(fid_src, NAME_GROUP_REF, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
- /* close the SRC file */
- if (H5Fclose(fid_src) < 0)
- TEST_ERROR
+ /* open the destination group */
+ if ((gid2 = H5Gopen2(fid_dst, NAME_GROUP_REF, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+ }
+ else {
+ /* Unknown flag */
+ TEST_ERROR
+ } /* end else */
- /* close the DST file */
- if (H5Fclose(fid_dst) < 0)
- TEST_ERROR
+ /* Check if the groups are equal */
+ if (compare_groups(gid, gid2, pid, depth, flag) != TRUE)
+ TEST_ERROR
+ if (H5Gclose(gid2) < 0)
+ TEST_ERROR
+ if (H5Gclose(gid) < 0)
+ TEST_ERROR
- /* close properties */
- if (H5Pclose(pid) < 0)
- TEST_ERROR
+ /* close the SRC file */
+ if (H5Fclose(fid_src) < 0)
+ TEST_ERROR
+
+ /* close the DST file */
+ if (H5Fclose(fid_dst) < 0)
+ TEST_ERROR
+
+ /* close properties */
+ if (H5Pclose(pid) < 0)
+ TEST_ERROR
+
+ PASSED();
+ }
- PASSED();
return 0;
error:
diff --git a/test/testvdsswmr.sh.in b/test/testvdsswmr.sh.in
index c57cc08..ea1d77d 100644
--- a/test/testvdsswmr.sh.in
+++ b/test/testvdsswmr.sh.in
@@ -104,7 +104,23 @@ if [ $rc -ne 0 ] ; then
echo "The VFD specified by the HDF5_DRIVER environment variable"
echo "does not support SWMR."
echo
- echo "SWMR acceptance tests skipped"
+ echo "Virtual dataset SWMR acceptance tests skipped"
+ echo
+ exit 0
+fi
+
+# Check to see if the VOL connector specified by the HDF5_VOL_CONNECTOR
+# environment variable supports Virtual Datasets.
+#
+# Note: Depends on vds_elink_compat_vol tool from $(topdir)/utils
+$bindir/vds_elink_compat_vol
+rc=$?
+if [ $rc -ne 0 ] ; then
+ echo
+ echo "The VOL connector specified by the HDF5_VOL_CONNECTOR environment"
+ echo "variable does not support virtual datasets."
+ echo
+ echo "Virtual dataset SWMR acceptance tests skipped"
echo
exit 0
fi
diff --git a/test/tsohm.c b/test/tsohm.c
index 774378a..68550cb 100644
--- a/test/tsohm.c
+++ b/test/tsohm.c
@@ -23,7 +23,8 @@
*/
#define H5F_FRIEND /* suppress error about including H5Fpkg */
#define H5F_TESTING
-#include "H5Fpkg.h" /* File access */
+#include "H5Fpkg.h" /* File access */
+#include "H5VLprivate.h" /* Virtual Object Layer */
/* Default SOHM values */
#define DEF_NUM_INDEXES 0
@@ -3225,11 +3226,12 @@ test_sohm_delete_revert(void)
static void
verify_dset_create_and_open_through_extlink_with_sohm(hid_t src_fcpl_id, hid_t dst_fcpl_id)
{
- hid_t src_file_id = -1;
- hid_t dst_file_id = -1;
- hid_t space_id = -1;
- hid_t dset_id = -1;
+ hid_t src_file_id = H5I_INVALID_HID;
+ hid_t dst_file_id = H5I_INVALID_HID;
+ hid_t space_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
hsize_t dims[] = {1, 1};
+ hbool_t is_native;
herr_t ret;
/* Create files */
@@ -3242,20 +3244,31 @@ verify_dset_create_and_open_through_extlink_with_sohm(hid_t src_fcpl_id, hid_t d
ret = H5Lcreate_external(FILENAME_DST, "/", src_file_id, "ext_link", H5P_DEFAULT, H5P_DEFAULT);
CHECK_I(ret, "H5Lcreate_external");
+ /* Check for operating with native (only) VOL connector */
+ is_native = FALSE;
+ ret = H5VL_fapl_is_native(H5P_DEFAULT, &is_native);
+ CHECK_I(ret, "H5VL__fapl_is_native_test");
+
/* Create a dataset through the external link */
space_id = H5Screate_simple(2, dims, dims);
CHECK_I(space_id, "H5Screate_simple");
dset_id = H5Dcreate2(src_file_id, "ext_link/dataset", H5T_NATIVE_FLOAT, space_id, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT);
- CHECK_I(dset_id, "H5Dcreate2");
+ if (is_native) {
+ CHECK_I(dset_id, "H5Dcreate2");
+
+ /* Close the dataset */
+ ret = H5Sclose(space_id);
+ CHECK_I(ret, "H5Sclose");
+ ret = H5Dclose(dset_id);
+ CHECK_I(ret, "H5Dclose");
+ }
+ else
+ VERIFY(dset_id, H5I_INVALID_HID, "H5Dcreate2");
/* Close the dataset and both files to make sure everything gets flushed
* out of memory
*/
- ret = H5Sclose(space_id);
- CHECK_I(ret, "H5Sclose");
- ret = H5Dclose(dset_id);
- CHECK_I(ret, "H5Dclose");
ret = H5Fclose(src_file_id);
CHECK_I(ret, "H5Fclose");
ret = H5Fclose(dst_file_id);
@@ -3265,16 +3278,18 @@ verify_dset_create_and_open_through_extlink_with_sohm(hid_t src_fcpl_id, hid_t d
* the wrong file, it'll be impossible to read the dataset's object
* header.
*/
- dst_file_id = H5Fopen(FILENAME_DST, H5F_ACC_RDONLY, H5P_DEFAULT);
- CHECK_I(dst_file_id, "H5Fopen");
- dset_id = H5Dopen2(dst_file_id, "dataset", H5P_DEFAULT);
- CHECK_I(dset_id, "H5Dopen2");
+ if (is_native) {
+ dst_file_id = H5Fopen(FILENAME_DST, H5F_ACC_RDONLY, H5P_DEFAULT);
+ CHECK_I(dst_file_id, "H5Fopen");
+ dset_id = H5Dopen2(dst_file_id, "dataset", H5P_DEFAULT);
+ CHECK_I(dset_id, "H5Dopen2");
- /* Cleanup */
- ret = H5Dclose(dset_id);
- CHECK_I(ret, "H5Dclose");
- ret = H5Fclose(dst_file_id);
- CHECK_I(ret, "H5Fclose");
+ /* Cleanup */
+ ret = H5Dclose(dset_id);
+ CHECK_I(ret, "H5Dclose");
+ ret = H5Fclose(dst_file_id);
+ CHECK_I(ret, "H5Fclose");
+ }
} /* verify_dset_create_and_open_through_extlink_with_sohm */
/*-------------------------------------------------------------------------
diff --git a/test/vds.c b/test/vds.c
index 61b974b..c280560 100644
--- a/test/vds.c
+++ b/test/vds.c
@@ -12289,6 +12289,7 @@ main(void)
int test_api_config;
unsigned bit_config;
H5F_libver_t low, high; /* Low and high bounds */
+ hbool_t is_native; /* Whether native VOL connector is being used */
const char * env_h5_drvr; /* File Driver value from environment */
int nerrors = 0;
@@ -12310,6 +12311,11 @@ main(void)
h5_reset();
fapl = h5_fileaccess();
+ /* Check for operating with native (only) VOL connector */
+ is_native = FALSE;
+ if (H5VL_fapl_is_native(fapl, &is_native) < 0)
+ TEST_ERROR;
+
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
/* Create FAPLs for VDS and source files */
@@ -12355,53 +12361,61 @@ main(void)
nerrors += test_api((test_api_config_t)test_api_config, vds_fapl, low);
TESTING_2("Virtual dataset I/O")
+
+ /* Skip tests for virtual dataset I/O when using non-native VOL connectors */
+ if (!is_native) {
+ SKIPPED();
+ HDputs(" Not using native VOL connector");
+ }
+ else {
#ifdef VDS_TEST_VERBOSE
- HDputs("");
+ HDputs("");
#else /* VDS_TEST_VERBOSE */
- tmp_nerrors = nerrors;
+ tmp_nerrors = nerrors;
#endif /* VDS_TEST_VERBOSE */
- for (bit_config = 0; bit_config < TEST_IO_NTESTS; bit_config++) {
- /* Skip invalid configurations */
- if ((bit_config & TEST_IO_FCLOSE_SEMI) && (bit_config & TEST_IO_FCLOSE_STRONG))
- continue;
-
- /* Print message */
- PRINT_CONFIG(
- "%s%s%s, %s file close degree",
- bit_config & TEST_IO_CLOSE_SRC ? "closed source dataset, " : "",
- bit_config & TEST_IO_DIFFERENT_FILE ? "different source file" : "same source file",
- bit_config & TEST_IO_REOPEN_VIRT ? ", reopen virtual file" : "",
- bit_config & TEST_IO_FCLOSE_SEMI
- ? "H5F_CLOSE_SEMI"
- : (bit_config & TEST_IO_FCLOSE_STRONG ? "H5F_CLOSE_STRONG" : "H5F_CLOSE_WEAK"));
-
- /* Set file close degree */
- if (bit_config & TEST_IO_FCLOSE_SEMI) {
- if (H5Pset_fclose_degree(vds_fapl, H5F_CLOSE_SEMI) < 0)
- TEST_ERROR
- }
- else if (bit_config & TEST_IO_FCLOSE_STRONG) {
- if (H5Pset_fclose_degree(vds_fapl, H5F_CLOSE_STRONG) < 0)
- TEST_ERROR
- }
- else {
- if (H5Pset_fclose_degree(vds_fapl, H5F_CLOSE_WEAK) < 0)
- TEST_ERROR
- }
+ for (bit_config = 0; bit_config < TEST_IO_NTESTS; bit_config++) {
+ /* Skip invalid configurations */
+ if ((bit_config & TEST_IO_FCLOSE_SEMI) && (bit_config & TEST_IO_FCLOSE_STRONG))
+ continue;
+
+ /* Print message */
+ PRINT_CONFIG(
+ "%s%s%s, %s file close degree",
+ bit_config & TEST_IO_CLOSE_SRC ? "closed source dataset, " : "",
+ bit_config & TEST_IO_DIFFERENT_FILE ? "different source file" : "same source file",
+ bit_config & TEST_IO_REOPEN_VIRT ? ", reopen virtual file" : "",
+ bit_config & TEST_IO_FCLOSE_SEMI
+ ? "H5F_CLOSE_SEMI"
+ : (bit_config & TEST_IO_FCLOSE_STRONG ? "H5F_CLOSE_STRONG" : "H5F_CLOSE_WEAK"));
+
+ /* Set file close degree */
+ if (bit_config & TEST_IO_FCLOSE_SEMI) {
+ if (H5Pset_fclose_degree(vds_fapl, H5F_CLOSE_SEMI) < 0)
+ TEST_ERROR
+ }
+ else if (bit_config & TEST_IO_FCLOSE_STRONG) {
+ if (H5Pset_fclose_degree(vds_fapl, H5F_CLOSE_STRONG) < 0)
+ TEST_ERROR
+ }
+ else {
+ if (H5Pset_fclose_degree(vds_fapl, H5F_CLOSE_WEAK) < 0)
+ TEST_ERROR
+ }
- /* Run tests */
- nerrors += test_basic_io(bit_config, vds_fapl, src_fapl);
- nerrors += test_vds_prefix_first(bit_config, vds_fapl, src_fapl);
- nerrors += test_unlim(bit_config, vds_fapl, src_fapl);
- nerrors += test_printf(bit_config, vds_fapl, src_fapl);
- nerrors += test_all(bit_config, vds_fapl, src_fapl);
- }
+ /* Run tests */
+ nerrors += test_basic_io(bit_config, vds_fapl, src_fapl);
+ nerrors += test_vds_prefix_first(bit_config, vds_fapl, src_fapl);
+ nerrors += test_unlim(bit_config, vds_fapl, src_fapl);
+ nerrors += test_printf(bit_config, vds_fapl, src_fapl);
+ nerrors += test_all(bit_config, vds_fapl, src_fapl);
+ }
#ifndef VDS_TEST_VERBOSE
- if (tmp_nerrors == nerrors)
- PASSED();
+ if (tmp_nerrors == nerrors)
+ PASSED();
#endif /* VDS_TEST_VERBOSE */
+ }
nerrors += test_dapl_values(vds_fapl);
diff --git a/test/vds_env.c b/test/vds_env.c
index 5020db6..5e9c17d 100644
--- a/test/vds_env.c
+++ b/test/vds_env.c
@@ -17,6 +17,7 @@
* Purpose: Tests datasets with virtual layout.
*/
#include "h5test.h"
+#include "H5VLprivate.h" /* Virtual Object Layer */
const char *FILENAME[] = {"vds_env_virt_0", "vds_env_virt_3", "vds_env_src_2", "vds_env%%_src2", NULL};
@@ -66,201 +67,215 @@ test_vds_prefix_second(unsigned config, hid_t fapl)
int fill = -1; /* Fill value */
int i, j;
char buffer[1024]; /* buffer to read vds_prefix */
+ hbool_t is_native; /* Whether native VOL connector is being used */
TESTING("basic virtual dataset I/O via H5Pset_vds_prefix(): all selection with ENV prefix")
- h5_fixname(FILENAME[0], fapl, vfilename, sizeof vfilename);
- h5_fixname(FILENAME[1], fapl, vfilename2, sizeof vfilename2);
- h5_fixname(FILENAME[2], fapl, srcfilename, sizeof srcfilename);
- h5_fixname_printf(FILENAME[2], fapl, srcfilename_map, sizeof srcfilename_map);
- h5_fixname(FILENAME[3], fapl, srcfilenamepct, sizeof srcfilenamepct);
- h5_fixname_printf(srcfilenamepct_map_orig, fapl, srcfilenamepct_map, sizeof srcfilenamepct_map);
+ /* Check for operating with native (only) VOL connector */
+ is_native = FALSE;
+ if (H5VL_fapl_is_native(fapl, &is_native) < 0)
+ TEST_ERROR;
- /* create tmp directory and get current working directory path */
- if (HDmkdir(TMPDIR, (mode_t)0755) < 0 && errno != EEXIST)
- TEST_ERROR
-
- /* Create DCPL */
- if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- TEST_ERROR
-
- /* Set fill value */
- if (H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fill) < 0)
- TEST_ERROR
-
- /* Set prefix to a nonexistent directory, will be overwritten by environment variable */
- if ((dapl = H5Pcreate(H5P_DATASET_ACCESS)) < 0)
- TEST_ERROR
-
- if (H5Pset_virtual_prefix(dapl, "someprefix") < 0)
- TEST_ERROR
- if (H5Pget_virtual_prefix(dapl, buffer, sizeof(buffer)) < 0)
- TEST_ERROR
-
- if (HDstrcmp(buffer, "someprefix") != 0)
- FAIL_PUTS_ERROR("vds prefix not set correctly");
+ /* Skip tests for virtual dataset I/O when using non-native VOL connectors */
+ if (!is_native && (config & TEST_IO_DIFFERENT_FILE)) {
+ SKIPPED();
+ HDputs(" Not using native VOL connector");
+ }
+ else {
+ h5_fixname(FILENAME[0], fapl, vfilename, sizeof vfilename);
+ h5_fixname(FILENAME[1], fapl, vfilename2, sizeof vfilename2);
+ h5_fixname(FILENAME[2], fapl, srcfilename, sizeof srcfilename);
+ h5_fixname_printf(FILENAME[2], fapl, srcfilename_map, sizeof srcfilename_map);
+ h5_fixname(FILENAME[3], fapl, srcfilenamepct, sizeof srcfilenamepct);
+ h5_fixname_printf(srcfilenamepct_map_orig, fapl, srcfilenamepct_map, sizeof srcfilenamepct_map);
+
+ /* create tmp directory and get current working directory path */
+ if (HDmkdir(TMPDIR, (mode_t)0755) < 0 && errno != EEXIST)
+ TEST_ERROR
- /* Create source dataspace */
- if ((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ /* Create DCPL */
+ if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ TEST_ERROR
- /* Create virtual dataspace */
- if ((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ /* Set fill value */
+ if (H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fill) < 0)
+ TEST_ERROR
- /* Select all (should not be necessary, but just to be sure) */
- if (H5Sselect_all(srcspace[0]) < 0)
- TEST_ERROR
- if (H5Sselect_all(vspace[0]) < 0)
- TEST_ERROR
+ /* Set prefix to a nonexistent directory, will be overwritten by environment variable */
+ if ((dapl = H5Pcreate(H5P_DATASET_ACCESS)) < 0)
+ TEST_ERROR
- /* Add virtual layout mapping */
- if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset",
- srcspace[0]) < 0)
- TEST_ERROR
+ if (H5Pset_virtual_prefix(dapl, "someprefix") < 0)
+ TEST_ERROR
+ if (H5Pget_virtual_prefix(dapl, buffer, sizeof(buffer)) < 0)
+ TEST_ERROR
- /* Create virtual file */
- if ((vfile = H5Fcreate(vfilename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if (HDstrcmp(buffer, "someprefix") != 0)
+ FAIL_PUTS_ERROR("vds prefix not set correctly");
- /* Create source file if requested */
- if (config & TEST_IO_DIFFERENT_FILE) {
- if (NULL == HDgetcwd(buffer, 1024))
- TEST_ERROR
- if (HDchdir(TMPDIR) < 0)
+ /* Create source dataspace */
+ if ((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
TEST_ERROR
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+
+ /* Create virtual dataspace */
+ if ((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
TEST_ERROR
- if (HDchdir(buffer) < 0)
+
+ /* Select all (should not be necessary, but just to be sure) */
+ if (H5Sselect_all(srcspace[0]) < 0)
TEST_ERROR
- }
- else {
- srcfile[0] = vfile;
- if (H5Iinc_ref(srcfile[0]) < 0)
+ if (H5Sselect_all(vspace[0]) < 0)
TEST_ERROR
- }
- /* Create source dataset */
- if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
- H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
-
- /* Create virtual dataset */
- if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0)
- TEST_ERROR
-
- /* Populate write buffer */
- for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
- for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
- buf[i][j] = (i * (int)(sizeof(buf[0]) / sizeof(buf[0][0]))) + j;
-
- /* Write data directly to source dataset */
- if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ /* Add virtual layout mapping */
+ if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".",
+ "src_dset", srcspace[0]) < 0)
+ TEST_ERROR
- /* Close srcdset and srcfile if config option specified */
- if (config & TEST_IO_CLOSE_SRC) {
- if (H5Dclose(srcdset[0]) < 0)
+ /* Create virtual file */
+ if ((vfile = H5Fcreate(vfilename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR
- srcdset[0] = -1;
+ /* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if (H5Fclose(srcfile[0]) < 0)
+ if (NULL == HDgetcwd(buffer, 1024))
+ TEST_ERROR
+ if (HDchdir(TMPDIR) < 0)
+ TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ TEST_ERROR
+ if (HDchdir(buffer) < 0)
+ TEST_ERROR
+ }
+ else {
+ srcfile[0] = vfile;
+ if (H5Iinc_ref(srcfile[0]) < 0)
TEST_ERROR
- srcfile[0] = -1;
}
- }
- /* Reopen virtual dataset and file if config option specified */
- if (config & TEST_IO_REOPEN_VIRT) {
- if (H5Dclose(vdset) < 0)
- TEST_ERROR
- vdset = -1;
- if (H5Fclose(vfile) < 0)
+ /* Create source dataset */
+ if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
+ H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- vfile = -1;
- if ((vfile = H5Fopen(vfilename2, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
- if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
+
+ /* Create virtual dataset */
+ if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0)
TEST_ERROR
- }
- /* Read data through virtual dataset */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
- if (H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ /* Populate write buffer */
+ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
+ for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
+ buf[i][j] = (i * (int)(sizeof(buf[0]) / sizeof(buf[0][0]))) + j;
- /* Verify read data */
- for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) {
- for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
- if (rbuf[i][j] != buf[i][j]) {
- TEST_ERROR
- }
- }
+ /* Write data directly to source dataset */
+ if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
+ TEST_ERROR
- /* Adjust write buffer */
- for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
- for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
- buf[i][j] += (int)(sizeof(buf) / sizeof(buf[0][0]));
+ /* Close srcdset and srcfile if config option specified */
+ if (config & TEST_IO_CLOSE_SRC) {
+ if (H5Dclose(srcdset[0]) < 0)
+ TEST_ERROR
+ srcdset[0] = -1;
- /* Write data through virtual dataset */
- if (H5Dwrite(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ if (config & TEST_IO_DIFFERENT_FILE) {
+ if (H5Fclose(srcfile[0]) < 0)
+ TEST_ERROR
+ srcfile[0] = -1;
+ }
+ }
- /* Reopen srcdset and srcfile if config option specified */
- if (config & TEST_IO_CLOSE_SRC) {
- if (config & TEST_IO_DIFFERENT_FILE) {
- if (NULL == HDgetcwd(buffer, 1024))
+ /* Reopen virtual dataset and file if config option specified */
+ if (config & TEST_IO_REOPEN_VIRT) {
+ if (H5Dclose(vdset) < 0)
TEST_ERROR
- if (HDchdir(TMPDIR) < 0)
+ vdset = -1;
+ if (H5Fclose(vfile) < 0)
TEST_ERROR
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
+ vfile = -1;
+ if ((vfile = H5Fopen(vfilename2, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
- if (HDchdir(buffer) < 0)
+ if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
}
- if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset", H5P_DEFAULT)) < 0)
+
+ /* Read data through virtual dataset */
+ HDmemset(rbuf[0], 0, sizeof(rbuf));
+ if (H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
TEST_ERROR
- }
- /* Read data directly from source dataset */
- HDmemset(rbuf[0], 0, sizeof(rbuf));
- if (H5Dread(srcdset[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ /* Verify read data */
+ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) {
+ for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
+ if (rbuf[i][j] != buf[i][j]) {
+ TEST_ERROR
+ }
+ }
- /* Verify read data */
- for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
- for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
- if (rbuf[i][j] != buf[i][j])
+ /* Adjust write buffer */
+ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
+ for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
+ buf[i][j] += (int)(sizeof(buf) / sizeof(buf[0][0]));
+
+ /* Write data through virtual dataset */
+ if (H5Dwrite(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
+ TEST_ERROR
+
+ /* Reopen srcdset and srcfile if config option specified */
+ if (config & TEST_IO_CLOSE_SRC) {
+ if (config & TEST_IO_DIFFERENT_FILE) {
+ if (NULL == HDgetcwd(buffer, 1024))
+ TEST_ERROR
+ if (HDchdir(TMPDIR) < 0)
+ TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
+ TEST_ERROR
+ if (HDchdir(buffer) < 0)
+ TEST_ERROR
+ }
+ if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset", H5P_DEFAULT)) < 0)
TEST_ERROR
+ }
- /* Close */
- if (H5Dclose(vdset) < 0)
- TEST_ERROR
- vdset = -1;
- if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
- srcdset[0] = -1;
- if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
- srcfile[0] = -1;
- if (H5Fclose(vfile) < 0)
- TEST_ERROR
- vfile = -1;
- if (H5Sclose(srcspace[0]) < 0)
- TEST_ERROR
- srcspace[0] = -1;
- if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
- vspace[0] = -1;
- if (H5Pclose(dapl) < 0)
- TEST_ERROR
- dapl = -1;
- if (H5Pclose(dcpl) < 0)
- TEST_ERROR
- dcpl = -1;
+ /* Read data directly from source dataset */
+ HDmemset(rbuf[0], 0, sizeof(rbuf));
+ if (H5Dread(srcdset[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
+ TEST_ERROR
+
+ /* Verify read data */
+ for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
+ for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
+ if (rbuf[i][j] != buf[i][j])
+ TEST_ERROR
+
+ /* Close */
+ if (H5Dclose(vdset) < 0)
+ TEST_ERROR
+ vdset = -1;
+ if (H5Dclose(srcdset[0]) < 0)
+ TEST_ERROR
+ srcdset[0] = -1;
+ if (H5Fclose(srcfile[0]) < 0)
+ TEST_ERROR
+ srcfile[0] = -1;
+ if (H5Fclose(vfile) < 0)
+ TEST_ERROR
+ vfile = -1;
+ if (H5Sclose(srcspace[0]) < 0)
+ TEST_ERROR
+ srcspace[0] = -1;
+ if (H5Sclose(vspace[0]) < 0)
+ TEST_ERROR
+ vspace[0] = -1;
+ if (H5Pclose(dapl) < 0)
+ TEST_ERROR
+ dapl = -1;
+ if (H5Pclose(dcpl) < 0)
+ TEST_ERROR
+ dcpl = -1;
+
+ PASSED();
+ }
- PASSED();
return 0;
error:
diff --git a/test/vol.c b/test/vol.c
index aba9311..34e89a0 100644
--- a/test/vol.c
+++ b/test/vol.c
@@ -28,7 +28,12 @@
#include "H5VLpkg.h" /* Virtual Object Layer */
/* Filename */
-const char *FILENAME[] = {"native_vol_test", NULL};
+const char *FILENAME[] = {"native_vol_test", /* 0 */
+ "vol_public", /* 1 */
+ NULL};
+
+#define PUBLIC_VOL_API_DATASET_NAME "/Dataset1"
+#define PUBLIC_VOL_API_DATASET_SIZE 10
#define NATIVE_VOL_TEST_GROUP_NAME "test_group"
#define NATIVE_VOL_TEST_DATASET_NAME "test_dataset"
@@ -2106,6 +2111,150 @@ error:
} /* end test_async_vol_props() */
/*-------------------------------------------------------------------------
+ * Function: test_public_vol_api()
+ *
+ * Purpose: Test calling the public VOL routines directly.
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_public_vol_api(void)
+{
+ char filename[1024];
+ void * file; /* File object */
+ void * dataset; /* Dataset object */
+ H5VL_loc_params_t loc_params; /* VOL location parameters for operations */
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t fcpl_id = H5I_INVALID_HID;
+ hid_t lcpl_id = H5I_INVALID_HID;
+ hid_t dcpl_id = H5I_INVALID_HID;
+ hid_t dapl_id = H5I_INVALID_HID;
+ hid_t dxpl_id = H5I_INVALID_HID;
+ hid_t vol_id = H5I_INVALID_HID;
+ hid_t space_id = H5I_INVALID_HID;
+ hsize_t curr_dims;
+ int wdata[PUBLIC_VOL_API_DATASET_SIZE];
+ int rdata[PUBLIC_VOL_API_DATASET_SIZE];
+ unsigned u;
+
+ TESTING("Public VOL API");
+
+ /* Retrieve the file access property for testing */
+ fapl_id = h5_fileaccess();
+ h5_fixname(FILENAME[1], fapl_id, filename, sizeof filename);
+
+ /* Get property list IDs we need */
+ /* (H5P_DEFAULT is not supported by public callback routines) */
+ if ((fcpl_id = H5Pcreate(H5P_FILE_CREATE)) < 0)
+ FAIL_STACK_ERROR
+ if ((lcpl_id = H5Pcreate(H5P_LINK_CREATE)) < 0)
+ FAIL_STACK_ERROR
+ if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ FAIL_STACK_ERROR
+ if ((dapl_id = H5Pcreate(H5P_DATASET_ACCESS)) < 0)
+ FAIL_STACK_ERROR
+ if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Retrieve the current VOL connector ID */
+ if (H5Pget_vol_id(fapl_id, &vol_id) < 0)
+ FAIL_STACK_ERROR
+ if (H5I_INVALID_HID == vol_id)
+ TEST_ERROR
+
+ /* Create dataspace for operations */
+ curr_dims = PUBLIC_VOL_API_DATASET_SIZE;
+ if ((space_id = H5Screate_simple(1, &curr_dims, NULL)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Indicate that a new API context should be pushed */
+ if (H5Pset_plugin_new_api_context(dxpl_id, TRUE) < 0)
+ FAIL_STACK_ERROR
+
+ /* Create a file */
+ if (NULL == (file = H5VLfile_create(filename, H5F_ACC_TRUNC, fcpl_id, fapl_id, dxpl_id, NULL)))
+ TEST_ERROR
+
+ /* Set up VOL location parameters */
+ loc_params.type = H5VL_OBJECT_BY_SELF;
+ loc_params.obj_type = H5I_FILE;
+
+ /* Create a dataset */
+ if (NULL == (dataset = H5VLdataset_create(file, &loc_params, vol_id, PUBLIC_VOL_API_DATASET_NAME, lcpl_id,
+ H5T_NATIVE_INT, space_id, dcpl_id, dapl_id, dxpl_id, NULL)))
+ TEST_ERROR
+
+ /* Initialize data */
+ for (u = 0; u < PUBLIC_VOL_API_DATASET_SIZE; u++)
+ wdata[u] = (int)u;
+
+ /* Write data to the dataset */
+ if (H5VLdataset_write(dataset, vol_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl_id, wdata, NULL) < 0)
+ TEST_ERROR
+
+ /* Read data from the dataset */
+ if (H5VLdataset_read(dataset, vol_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl_id, rdata, NULL) < 0)
+ TEST_ERROR
+
+ /* Verify data */
+ for (u = 0; u < PUBLIC_VOL_API_DATASET_SIZE; u++)
+ if (wdata[u] != rdata[u])
+ TEST_ERROR
+
+ /* Close dataset */
+ if (H5VLdataset_close(dataset, vol_id, dxpl_id, NULL) < 0)
+ TEST_ERROR
+
+ /* Close file */
+ if (H5VLfile_close(file, vol_id, dxpl_id, NULL) < 0)
+ TEST_ERROR
+
+ /* Close dataspace */
+ if (H5Sclose(space_id) < 0)
+ FAIL_STACK_ERROR
+
+ /* Close property lists */
+ if (H5Pclose(fapl_id) < 0)
+ FAIL_STACK_ERROR
+ if (H5Pclose(fcpl_id) < 0)
+ FAIL_STACK_ERROR
+ if (H5Pclose(lcpl_id) < 0)
+ FAIL_STACK_ERROR
+ if (H5Pclose(dcpl_id) < 0)
+ FAIL_STACK_ERROR
+ if (H5Pclose(dapl_id) < 0)
+ FAIL_STACK_ERROR
+ if (H5Pclose(dxpl_id) < 0)
+ FAIL_STACK_ERROR
+
+ /* Close VOL connector ID */
+ if (H5VLclose(vol_id) < 0)
+ FAIL_STACK_ERROR
+
+ PASSED();
+
+ return SUCCEED;
+
+error:
+ H5E_BEGIN_TRY
+ {
+ H5VLclose(vol_id);
+ H5Pclose(fapl_id);
+ H5Pclose(fcpl_id);
+ H5Pclose(lcpl_id);
+ H5Pclose(dcpl_id);
+ H5Pclose(dapl_id);
+ H5Pclose(dxpl_id);
+ H5Sclose(space_id);
+ }
+ H5E_END_TRY;
+
+ return FAIL;
+} /* end test_public_vol_api() */
+
+/*-------------------------------------------------------------------------
* Function: main
*
* Purpose: Tests the virtual object layer interface (H5VL)
@@ -2140,6 +2289,7 @@ main(void)
nerrors += test_basic_link_operation() < 0 ? 1 : 0;
nerrors += test_basic_datatype_operation(env_h5_drvr) < 0 ? 1 : 0;
nerrors += test_async_vol_props() < 0 ? 1 : 0;
+ nerrors += test_public_vol_api() < 0 ? 1 : 0;
if (nerrors) {
HDprintf("***** %d Virtual Object Layer TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");