summaryrefslogtreecommitdiffstats
path: root/test/set_extent.c
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2018-02-13 17:05:08 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2018-02-13 17:05:08 (GMT)
commit0a61befddc6f93cec1aa669e3c348e40e83ff0e7 (patch)
tree9d604314d09ee1dce7ce5255ed72ccd9b3a14b07 /test/set_extent.c
parent96c656ae3fa02721cddf5f570d7372f38b886d76 (diff)
downloadhdf5-0a61befddc6f93cec1aa669e3c348e40e83ff0e7.zip
hdf5-0a61befddc6f93cec1aa669e3c348e40e83ff0e7.tar.gz
hdf5-0a61befddc6f93cec1aa669e3c348e40e83ff0e7.tar.bz2
Additional tests
Description: - Revised and add more variety to version bound tests per review - Revised gen_bounds.c per review Platforms tested: Linux/64 (jelly) Linux/32 (jam) Darwin (osx1010test)
Diffstat (limited to 'test/set_extent.c')
-rw-r--r--test/set_extent.c31
1 files changed, 26 insertions, 5 deletions
diff --git a/test/set_extent.c b/test/set_extent.c
index b9536e5..0467073 100644
--- a/test/set_extent.c
+++ b/test/set_extent.c
@@ -427,14 +427,35 @@ error:
*/
static int do_layouts( hid_t fapl )
{
+ H5F_libver_t low, high; /* Low and high bounds */
+ herr_t ret; /* Generic return value */
- TESTING("storage layout use");
+ TESTING("storage layout use - tested with all low/high library format bounds");
+ /* Loop through all the combinations of low/high library format bounds */
+ for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) {
+ for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) {
- if (test_layouts( H5D_COMPACT, fapl ) < 0)
- goto error;
+ hid_t new_fapl;
- if (test_layouts( H5D_CONTIGUOUS, fapl ) < 0)
- goto error;
+ /* Copy plist to use locally to avoid modifying the original */
+ new_fapl = H5Pcopy(fapl);
+
+ /* Set version bounds */
+ H5E_BEGIN_TRY {
+ ret = H5Pset_libver_bounds(new_fapl, low, high);
+ } H5E_END_TRY;
+
+ if (ret < 0) /* Invalid low/high combinations */
+ continue;
+
+ if (test_layouts( H5D_COMPACT, new_fapl ) < 0)
+ goto error;
+
+ if (test_layouts( H5D_CONTIGUOUS, new_fapl ) < 0)
+ goto error;
+
+ } /* end for high */
+ } /* end for low */
PASSED();