summaryrefslogtreecommitdiffstats
path: root/test/vds_swmr_reader.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/vds_swmr_reader.c')
-rw-r--r--test/vds_swmr_reader.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/vds_swmr_reader.c b/test/vds_swmr_reader.c
index 16f3abe..d0ec77b 100644
--- a/test/vds_swmr_reader.c
+++ b/test/vds_swmr_reader.c
@@ -18,6 +18,7 @@ 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 +35,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
@@ -103,6 +106,8 @@ main(void)
} 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)
@@ -120,6 +125,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)