summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2018-12-18 20:12:21 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2018-12-18 20:12:21 (GMT)
commitbd096066c3d9613fcece7450f8628a3a660b6b4f (patch)
tree4edec402253ddbb69b9fc388b3996ddf1e09d47d /test
parentb486fd10a44df052c8c2f030ab8c2c25dfa0f8a2 (diff)
parentfc64bafb143b1d259282913fdbf0ba9f1a0a8069 (diff)
downloadhdf5-bd096066c3d9613fcece7450f8628a3a660b6b4f.zip
hdf5-bd096066c3d9613fcece7450f8628a3a660b6b4f.tar.gz
hdf5-bd096066c3d9613fcece7450f8628a3a660b6b4f.tar.bz2
Merge pull request #1384 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:build_tweaks to develop
* commit 'fc64bafb143b1d259282913fdbf0ba9f1a0a8069': Updates the autotools tests to also emit the VOL connector for each test.
Diffstat (limited to 'test')
-rw-r--r--test/h5test.c33
1 files changed, 19 insertions, 14 deletions
diff --git a/test/h5test.c b/test/h5test.c
index 6aad76a..47ddd34 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -802,10 +802,10 @@ h5_rmprefix(const char *filename)
*
* 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
+ * according to a constant or environment variable
*
- * Return: Success: A file access property list
- * Failure: -1
+ * Return: Success: A file access property list
+ * Failure: H5I_INVALID_HID
*
* Programmer: Robb Matzke
* Thursday, November 19, 1998
@@ -815,24 +815,29 @@ h5_rmprefix(const char *filename)
hid_t
h5_fileaccess(void)
{
- hid_t fapl = -1;
+ hid_t fapl_id = H5I_INVALID_HID;
- if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
- return -1;
+ if((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0)
+ goto error;
/* Attempt to set up a file driver first */
- if(h5_get_vfd_fapl(fapl) < 0)
- return -1;
+ if(h5_get_vfd_fapl(fapl_id) < 0)
+ goto error;
/* Next, try to set up a VOL connector */
- if(h5_get_vol_fapl(fapl) < 0)
- return -1;
+ if(h5_get_vol_fapl(fapl_id) < 0)
+ goto error;
/* Finally, check for libver bounds */
- if(h5_get_libver_fapl(fapl) < 0)
- return -1;
+ if(h5_get_libver_fapl(fapl_id) < 0)
+ goto error;
- return(fapl);
+ return fapl_id;
+
+error:
+ if(fapl_id != H5I_INVALID_HID)
+ H5Pclose(fapl_id);
+ return H5I_INVALID_HID;
} /* end h5_fileaccess() */
@@ -1042,7 +1047,7 @@ error:
* fapl but with a VOL connector set according to the constant
* or environment variable HDF5_VOL_CONNECTOR.
*
- * Return: Success: A file access property list ID
+ * Return: Success: 0
* Failure: -1
*
* Programmer: Jordan Henderson