diff options
author | Vailin Choi <vchoi@jam.ad.hdfgroup.org> | 2017-06-09 19:01:07 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@jam.ad.hdfgroup.org> | 2017-08-02 22:00:13 (GMT) |
commit | d7bfd458c4eadcfb338e9856256ecd98aa47aa10 (patch) | |
tree | 4cf86f842deec9df37aad04e622e92a1a9c8d9ed /test | |
parent | 8eaef34ef0140182dffca391fb0bc63cd2ef2bd1 (diff) | |
download | hdf5-d7bfd458c4eadcfb338e9856256ecd98aa47aa10.zip hdf5-d7bfd458c4eadcfb338e9856256ecd98aa47aa10.tar.gz hdf5-d7bfd458c4eadcfb338e9856256ecd98aa47aa10.tar.bz2 |
Changes made based on RFC review comments
Test the changes in a branch via daily testing.
Diffstat (limited to 'test')
-rw-r--r-- | test/tfile.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/tfile.c b/test/tfile.c index c59e756..70508cd 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -109,6 +109,7 @@ #define TEST_THRESHOLD10 10 /* Free space section threshold */ #define FSP_SIZE_DEF 4096 /* File space page size default */ #define FSP_SIZE512 512 /* File space page size */ +#define FSP_SIZE1G 1024*1024*1024 /* File space page size */ /* Declaration for test_libver_macros2() */ #define FILE6 "tfile6.h5" /* Test file */ @@ -3581,6 +3582,9 @@ test_filespace_info(const char *env_h5_drvr) * Setting value less than 512 will return an error; * --setting file space page size to 0 * --setting file space page size to 511 + * + * File space page size has a maximum size of 1 gigabyte. + * Setting value greater than 1 gigabyte will return an error. */ /* Create file creation property list template */ fcpl = H5Pcreate(H5P_FILE_CREATE); @@ -3598,6 +3602,12 @@ test_filespace_info(const char *env_h5_drvr) } H5E_END_TRY; VERIFY(ret, FAIL, "H5Pset_file_space_page_size"); + /* Setting to 1GB+1: should fail */ + H5E_BEGIN_TRY { + ret = H5Pset_file_space_page_size(fcpl, FSP_SIZE1G+1); + } H5E_END_TRY; + VERIFY(ret, FAIL, "H5Pset_file_space_page_size"); + /* Setting to 512: should succeed */ ret = H5Pset_file_space_page_size(fcpl, FSP_SIZE512); CHECK(ret, FAIL, "H5Pset_file_space_page_size"); @@ -3605,6 +3615,13 @@ test_filespace_info(const char *env_h5_drvr) CHECK(ret, FAIL, "H5Pget_file_space_page_size"); VERIFY(fsp_size, FSP_SIZE512, "H5Pget_file_space_page_size"); + /* Setting to 1GB: should succeed */ + ret = H5Pset_file_space_page_size(fcpl, FSP_SIZE1G); + CHECK(ret, FAIL, "H5Pset_file_space_page_size"); + ret = H5Pget_file_space_page_size(fcpl, &fsp_size); + CHECK(ret, FAIL, "H5Pget_file_space_page_size"); + VERIFY(fsp_size, FSP_SIZE1G, "H5Pget_file_space_page_size"); + /* Close property list */ H5Pclose(fcpl); |