summaryrefslogtreecommitdiffstats
path: root/test/vds_swmr_reader.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-08-18 20:36:57 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-08-18 20:36:57 (GMT)
commit16093cc00241824a3f595392aaa5aeab53d93b59 (patch)
tree421e39191c5e6d1b4ca1fbbe97e37c597b985335 /test/vds_swmr_reader.c
parent3413544b00a5a0c349e8f29dc98562bef287ef9c (diff)
downloadhdf5-16093cc00241824a3f595392aaa5aeab53d93b59.zip
hdf5-16093cc00241824a3f595392aaa5aeab53d93b59.tar.gz
hdf5-16093cc00241824a3f595392aaa5aeab53d93b59.tar.bz2
Merge HD prefix and whitespace changes from develop
Diffstat (limited to 'test/vds_swmr_reader.c')
-rw-r--r--test/vds_swmr_reader.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/vds_swmr_reader.c b/test/vds_swmr_reader.c
index 42721d5..eb9a82b 100644
--- a/test/vds_swmr_reader.c
+++ b/test/vds_swmr_reader.c
@@ -14,10 +14,13 @@
#include "h5test.h"
#include "vds_swmr.h"
+static hsize_t VDS_PLANE[RANK] = {1, FULL_HEIGHT, WIDTH};
+
int
main(void)
{
hid_t fid = -1; /* HDF5 file ID */
+ hid_t faplid = -1; /* file access property list ID */
hid_t did = -1; /* dataset ID */
hid_t msid = -1; /* memory dataspace ID */
hid_t fsid = -1; /* file dataspace ID */
@@ -34,7 +37,9 @@ main(void)
/* Open the VDS file and dataset */
- if((fid = H5Fopen(VDS_FILE_NAME, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, H5P_DEFAULT)) < 0)
+ if((faplid = h5_fileaccess()) < 0)
+ TEST_ERROR
+ if((fid = H5Fopen(VDS_FILE_NAME, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, faplid)) < 0)
TEST_ERROR
if((did = H5Dopen2(fid, VDS_DSET_NAME, H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -97,13 +102,14 @@ main(void)
TEST_ERROR
if(H5Dread(did, H5T_NATIVE_INT, msid, fsid, H5P_DEFAULT, buffer) < 0)
TEST_ERROR
-
if(H5Sclose(fsid) < 0)
TEST_ERROR
} while (dims[0] < N_PLANES_TO_WRITE);
/* Close file and dataset */
+ if(H5Pclose(faplid) < 0)
+ TEST_ERROR
if(H5Sclose(msid) < 0)
TEST_ERROR
if(H5Dclose(did) < 0)
@@ -121,6 +127,8 @@ error:
H5E_BEGIN_TRY {
if(fid >= 0)
(void)H5Fclose(fid);
+ if(faplid >= 0)
+ (void)H5Pclose(faplid);
if(did >= 0)
(void)H5Dclose(did);
if(msid >= 0)