diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2015-07-07 22:39:16 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2015-07-07 22:39:16 (GMT) |
commit | 29bb203283e7991a7d9ec89aeb4807aed03b3b74 (patch) | |
tree | 46478c724e8ca7ff95bd9df95fca8564fa7d55c7 /test | |
parent | 234cbe5c25957a130d96dd5691e71b739581e277 (diff) | |
download | hdf5-29bb203283e7991a7d9ec89aeb4807aed03b3b74.zip hdf5-29bb203283e7991a7d9ec89aeb4807aed03b3b74.tar.gz hdf5-29bb203283e7991a7d9ec89aeb4807aed03b3b74.tar.bz2 |
[svn-r27344] Updated the SWMR acceptance tests to use h5_fileaccess() to obtain
a VFD-specific file access property list when running 'make check-vfd'.
Tested on: OS X 10.10.2 (Yosemite) w/ clang 6.1.0 (Xcode 6.3.2)
Diffstat (limited to 'test')
-rw-r--r-- | test/swmr_addrem_writer.c | 2 | ||||
-rw-r--r-- | test/swmr_generator.c | 2 | ||||
-rw-r--r-- | test/swmr_reader.c | 11 | ||||
-rw-r--r-- | test/swmr_remove_reader.c | 11 | ||||
-rw-r--r-- | test/swmr_remove_writer.c | 2 | ||||
-rw-r--r-- | test/swmr_sparse_reader.c | 10 | ||||
-rw-r--r-- | test/swmr_sparse_writer.c | 2 | ||||
-rw-r--r-- | test/swmr_start_write.c | 4 | ||||
-rw-r--r-- | test/swmr_writer.c | 2 |
9 files changed, 34 insertions, 12 deletions
diff --git a/test/swmr_addrem_writer.c b/test/swmr_addrem_writer.c index 0df8dec..13b7cda 100644 --- a/test/swmr_addrem_writer.c +++ b/test/swmr_addrem_writer.c @@ -85,7 +85,7 @@ open_skeleton(const char *filename, unsigned verbose) assert(filename);
/* Create file access property list */
- if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
+ if((fapl = h5_fileaccess()) < 0)
return -1;
/* Set to use the latest library format */
diff --git a/test/swmr_generator.c b/test/swmr_generator.c index f556c3d..4e771eb 100644 --- a/test/swmr_generator.c +++ b/test/swmr_generator.c @@ -99,7 +99,7 @@ gen_skeleton(const char *filename, unsigned verbose, unsigned swmr_write, assert(index_type); /* Create file access property list */ - if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) + if((fapl = h5_fileaccess()) < 0) return -1; /* We ALWAYS select the latest file format for SWMR */ diff --git a/test/swmr_reader.c b/test/swmr_reader.c index 0ce368a..3fe3573 100644 --- a/test/swmr_reader.c +++ b/test/swmr_reader.c @@ -189,6 +189,7 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds, symbol_info_t **sym_rand = NULL; /* Pointers to array of random dataset IDs */ hid_t mem_sid; /* Memory dataspace ID */ hid_t fid; /* SWMR test file ID */ + hid_t fapl; /* file access property list */ symbol_t record; /* The record to read from the dataset */ unsigned v; /* Local index variable */ @@ -258,6 +259,10 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds, start_time = time(NULL); curr_time = start_time; + /* Create file access property list */ + if((fapl = h5_fileaccess()) < 0) + return -1; + /* Loop over reading records until [at least] the correct # of seconds have passed */ while(curr_time < (time_t)(start_time + (time_t)nseconds)) { @@ -266,7 +271,7 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds, fprintf(stderr, "Opening file: %s\n", filename); /* Open the file */ - if((fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, H5P_DEFAULT)) < 0) + if((fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0) return -1; /* Check 'common' datasets, if any */ @@ -318,6 +323,10 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds, if(H5Sclose(mem_sid) < 0) return -1; + /* Close the fapl */ + if(H5Pclose(fapl) < 0) + return -1; + /* Emit informational message */ if(verbose) fprintf(stderr, "Closing datasets\n"); diff --git a/test/swmr_remove_reader.c b/test/swmr_remove_reader.c index 93bd55c..05b580d 100644 --- a/test/swmr_remove_reader.c +++ b/test/swmr_remove_reader.c @@ -204,6 +204,7 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds, symbol_info_t **sym_rand = NULL; /* Pointers to array of random dataset IDs */
hid_t mem_sid; /* Memory dataspace ID */
hid_t fid; /* SWMR test file ID */
+ hid_t fapl; /* File access property list */
symbol_t record; /* The record to add to the dataset */
unsigned v; /* Local index variable */
@@ -273,6 +274,10 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds, start_time = time(NULL);
curr_time = start_time;
+ /* Create file access property list */
+ if((fapl = h5_fileaccess()) < 0)
+ return -1;
+
/* Loop over reading records until [at least] the correct # of seconds have passed */
while(curr_time < (time_t)(start_time + (time_t)nseconds)) {
@@ -281,7 +286,7 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds, fprintf(stderr, "Opening file: %s\n", filename);
/* Open the file */
- if((fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, H5P_DEFAULT)) < 0)
+ if((fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
return -1;
/* Check 'common' datasets, if any */
@@ -329,6 +334,10 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds, curr_time = time(NULL);
} /* end while */
+ /* Close the fapl */
+ if(H5Pclose(fapl) < 0)
+ return -1;
+
/* Close the memory dataspace */
if(H5Sclose(mem_sid) < 0)
return -1;
diff --git a/test/swmr_remove_writer.c b/test/swmr_remove_writer.c index 9924388..d22f900 100644 --- a/test/swmr_remove_writer.c +++ b/test/swmr_remove_writer.c @@ -85,7 +85,7 @@ open_skeleton(const char *filename, unsigned verbose) assert(filename);
/* Create file access property list */
- if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
+ if((fapl = h5_fileaccess()) < 0)
return -1;
/* Set to use the latest library format */
diff --git a/test/swmr_sparse_reader.c b/test/swmr_sparse_reader.c index 1678949..614d7b3 100644 --- a/test/swmr_sparse_reader.c +++ b/test/swmr_sparse_reader.c @@ -190,11 +190,15 @@ read_records(const char *filename, unsigned verbose, unsigned long nrecords, assert(filename);
assert(poll_time != 0);
- fapl = H5Pcreate(H5P_FILE_ACCESS);
+ /* Create file access property list */
+ if((fapl = h5_fileaccess()) < 0)
+ return -1;
+
H5Pset_fclose_degree(fapl, H5F_CLOSE_SEMI);
+
/* Emit informational message */
- if(verbose)
- fprintf(stderr, "Opening file: %s\n", filename);
+ if(verbose)
+ fprintf(stderr, "Opening file: %s\n", filename);
/* Open the file */
if((fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
diff --git a/test/swmr_sparse_writer.c b/test/swmr_sparse_writer.c index 5866b38..abcaea2 100644 --- a/test/swmr_sparse_writer.c +++ b/test/swmr_sparse_writer.c @@ -81,7 +81,7 @@ open_skeleton(const char *filename, unsigned verbose) assert(filename);
/* Create file access property list */
- if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
+ if((fapl = h5_fileaccess()) < 0)
return -1;
/* Set to use the latest library format */
diff --git a/test/swmr_start_write.c b/test/swmr_start_write.c index 72e9ba9..b282ae0 100644 --- a/test/swmr_start_write.c +++ b/test/swmr_start_write.c @@ -90,7 +90,7 @@ create_file(const char *filename, unsigned verbose, assert(index_type); /* Create file access property list */ - if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) + if((fapl = h5_fileaccess()) < 0) return -1; /* We ALWAYS select the latest file format for SWMR */ @@ -301,7 +301,7 @@ open_file(const char *filename, unsigned verbose) assert(filename); /* Create file access property list */ - if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) + if((fapl = h5_fileaccess()) < 0) return -1; /* Set to use the latest library format */ diff --git a/test/swmr_writer.c b/test/swmr_writer.c index 8378834..d748309 100644 --- a/test/swmr_writer.c +++ b/test/swmr_writer.c @@ -73,7 +73,7 @@ open_skeleton(const char *filename, unsigned verbose) assert(filename); /* Create file access property list */ - if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) + if((fapl = h5_fileaccess()) < 0) return -1; /* Set to use the latest library format */ |