summaryrefslogtreecommitdiffstats
path: root/test/h5test.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2019-01-06 05:06:45 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2019-01-06 05:06:45 (GMT)
commit92300f954fec70b3018182defab6933bf6f4bc88 (patch)
treee06729c237cfe05c5ef6dcaaf4091d395b076012 /test/h5test.c
parent0e34f0feaaeb6d2286f87f695f25fae45c070a42 (diff)
downloadhdf5-92300f954fec70b3018182defab6933bf6f4bc88.zip
hdf5-92300f954fec70b3018182defab6933bf6f4bc88.tar.gz
hdf5-92300f954fec70b3018182defab6933bf6f4bc88.tar.bz2
Corrected comment in src/H5VLint.c, fixed pass-through info size in
src/H5VLpassthru.c, switched to stashing VOL connector ID & info in API context (in src/H5CX.c, src/H5CXprivate.h, src/H5F.c, src/H5Fint.c, and src/H5Fefc.c), patched up all sorts of issues in the tests, to make them work with 'check-vfd' (and 'check-vol' again).
Diffstat (limited to 'test/h5test.c')
-rw-r--r--test/h5test.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/test/h5test.c b/test/h5test.c
index 32638e6..ea5e2f8 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -803,6 +803,50 @@ error:
/*-------------------------------------------------------------------------
+ * Function: h5_fileaccess_flags
+ *
+ * Purpose: Returns a file access template which is the default template
+ * but with a file driver, VOL connector, or libver bound set
+ * according to a constant or environment variable
+ *
+ * Return: Success: A file access property list
+ * Failure: H5I_INVALID_HID
+ *
+ * Programmer: Robb Matzke
+ * Thursday, November 19, 1998
+ *
+ *-------------------------------------------------------------------------
+ */
+hid_t
+h5_fileaccess_flags(unsigned flags)
+{
+ hid_t fapl_id = H5I_INVALID_HID;
+
+ if((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0)
+ goto error;
+
+ /* Attempt to set up a file driver first */
+ if((flags & H5_FILEACCESS_VFD) && h5_get_vfd_fapl(fapl_id) < 0)
+ goto error;
+
+ /* Next, try to set up a VOL connector */
+ if((flags & H5_FILEACCESS_VOL) && h5_get_vol_fapl(fapl_id) < 0)
+ goto error;
+
+ /* Finally, check for libver bounds */
+ if((flags & H5_FILEACCESS_LIBVER) && h5_get_libver_fapl(fapl_id) < 0)
+ goto error;
+
+ return fapl_id;
+
+error:
+ if(fapl_id != H5I_INVALID_HID)
+ H5Pclose(fapl_id);
+ return H5I_INVALID_HID;
+} /* end h5_fileaccess_flags() */
+
+
+/*-------------------------------------------------------------------------
* Function: h5_get_vfd_fapl
*
* Purpose: Sets the file driver for a FAPL according to the value specified