summaryrefslogtreecommitdiffstats
path: root/test/use_common.c
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2015-06-24 23:47:24 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2015-06-24 23:47:24 (GMT)
commit39b99473ea6e83aa394779a591eeef55fe141487 (patch)
tree624455e25b0c7221ee9507bb7bcbbfb2a8c4b0f2 /test/use_common.c
parente36e886cf75b836aba005abea24b955057778ebb (diff)
downloadhdf5-39b99473ea6e83aa394779a591eeef55fe141487.zip
hdf5-39b99473ea6e83aa394779a591eeef55fe141487.tar.gz
hdf5-39b99473ea6e83aa394779a591eeef55fe141487.tar.bz2
[svn-r27281] Bring revision #24478 from revise_chksum_retry branch to revise_chunks. h5committested.
Diffstat (limited to 'test/use_common.c')
-rw-r--r--test/use_common.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/use_common.c b/test/use_common.c
index 36d804c..c25f1f4 100644
--- a/test/use_common.c
+++ b/test/use_common.c
@@ -245,6 +245,7 @@ int write_uc_file(void)
{
hid_t fid; /* File ID for new HDF5 file */
hid_t dsid; /* dataset ID */
+ hid_t fapl; /* File access property list */
hid_t dcpl; /* Dataset creation property list */
char *name;
UC_CTYPE *buffer, *bufptr; /* data buffer */
@@ -261,7 +262,12 @@ int write_uc_file(void)
name = UC_opts.filename;
/* Open the file */
- if((fid = H5Fopen(name, H5F_ACC_RDWR | (UC_opts.use_swmr ? H5F_ACC_SWMR_WRITE : 0), H5P_DEFAULT)) < 0){
+ if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
+ return -1;
+ if(UC_opts.use_swmr)
+ if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
+ return -1;
+ if((fid = H5Fopen(name, H5F_ACC_RDWR | (UC_opts.use_swmr ? H5F_ACC_SWMR_WRITE : 0), fapl)) < 0){
fprintf(stderr, "H5Fopen failed\n");
return -1;
}
@@ -395,6 +401,10 @@ int write_uc_file(void)
fprintf(stderr, "Failed to close file space\n");
return -1;
}
+ if (H5Pclose(fapl) < 0){
+ fprintf(stderr, "Failed to property list\n");
+ return -1;
+ }
if (H5Fclose(fid) < 0){
fprintf(stderr, "Failed to close file id\n");
return -1;