summaryrefslogtreecommitdiffstats
path: root/test/tfile.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2017-08-01 20:20:58 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2017-08-01 20:20:58 (GMT)
commit8e5c993d9c55b99df36ab8a0c9b66a0de390c181 (patch)
treed353e33df4c6bffcdfcb2caba32c8a35ef7729d7 /test/tfile.c
parent0f396554d86dc26048d5c105ceb748e452fd9229 (diff)
parent464926f2a3adf3ef1c1e3ae60105544f08ff1e51 (diff)
downloadhdf5-8e5c993d9c55b99df36ab8a0c9b66a0de390c181.zip
hdf5-8e5c993d9c55b99df36ab8a0c9b66a0de390c181.tar.gz
hdf5-8e5c993d9c55b99df36ab8a0c9b66a0de390c181.tar.bz2
Merge branch 'develop' into vol_integration
Diffstat (limited to 'test/tfile.c')
-rw-r--r--test/tfile.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/tfile.c b/test/tfile.c
index eb4dff8..a5e98f8 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 */
@@ -3582,6 +3583,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);
@@ -3599,6 +3603,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");
@@ -3606,6 +3616,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);