diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2018-03-13 01:06:20 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2018-03-13 01:06:20 (GMT) |
commit | c76411768fe93ae6e8b720137bcfdbcc31639d6d (patch) | |
tree | 19e960f9cfb1ef04b11da2b4c65be12b0964722d /test/gen_bounds.c | |
parent | 2d4d39d15763042661347e5a16de6cf154537dda (diff) | |
parent | a8afb3ab3b32b07611fb5932303dd0594a1c9658 (diff) | |
download | hdf5-c76411768fe93ae6e8b720137bcfdbcc31639d6d.zip hdf5-c76411768fe93ae6e8b720137bcfdbcc31639d6d.tar.gz hdf5-c76411768fe93ae6e8b720137bcfdbcc31639d6d.tar.bz2 |
Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/~bmribler/hdf5_bmr_cpp3 into develop
Diffstat (limited to 'test/gen_bounds.c')
-rw-r--r-- | test/gen_bounds.c | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/test/gen_bounds.c b/test/gen_bounds.c index 9702176..7b670f7 100644 --- a/test/gen_bounds.c +++ b/test/gen_bounds.c @@ -267,11 +267,13 @@ error: /*********************************************************************** * gen_latest_latest() creates file "bounds_latest_latest.h5" * - * File contents: - * - Version 3 superblock (triggered by H5Fcreate with H5F_ACC_SWMR_WRITE) - * - A chunked dataset with layout version 4, "DS_chunked_layout_4". (H5Pset_chunk_opts) + * NOTE: As of March 2018, latest is 1.10. * - * NOTE: As of Feb 2018, latest is 1.10. + * File contents: + * - Version 3 superblock (NOTE: this can also be triggered by passing in + * H5F_ACC_SWMR_WRITE, in place of H5F_ACC_TRUNC, to H5Fcreate) + * - A chunked dataset with layout version 4, "DS_chunked_layout_4". + * (triggered by H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS) * * Return: SUCCEED/FAIL * @@ -279,6 +281,7 @@ error: static herr_t gen_latest_latest(void) { hid_t fid = -1; /* File ID */ + hid_t fapl = -1; /* File access property list ID */ hid_t dcpl = -1; /* Dataset creation property list ID */ hid_t space = -1; /* Dataspace ID */ hid_t dset = -1; /* Dataset ID */ @@ -289,8 +292,16 @@ static herr_t gen_latest_latest(void) int i, j; herr_t ret = SUCCEED; /* Generic return value */ - /* Create file with H5F_ACC_SWMR_WRITE, triggers version 3 superblock */ - fid = H5Fcreate(FILENAME_L_L, H5F_ACC_SWMR_WRITE, H5P_DEFAULT, H5P_DEFAULT); + /* Create file access property list */ + if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) TEST_ERROR; + + /* Set the "use the latest/latest version of the format" bounds + for creating objects in the file */ + if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) + TEST_ERROR; + + /* Create the file with version 3 superblock */ + fid = H5Fcreate(FILENAME_L_L, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); if (fid < 0) TEST_ERROR; /* @@ -351,6 +362,8 @@ error: /*********************************************************************** * gen_v18_latest() creates file "bounds_v18_latest.h5" * + * NOTE: As of March 2018, latest is 1.10. + * * File contents: * - Version 2 superblock * - A chunked dataset with layout version 3, "DS_chunked_layout_3". (default) |