summaryrefslogtreecommitdiffstats
path: root/test/fillval.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/fillval.c')
-rw-r--r--test/fillval.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/fillval.c b/test/fillval.c
index 29f37b4..e92872a 100644
--- a/test/fillval.c
+++ b/test/fillval.c
@@ -1513,7 +1513,7 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name,
/* Initialize dataspace & hyperslab info */
for(i = 0, nelmts = 1; i < 5; i++) {
- hs_size[i] = start_size[i] / 2;
+ hs_size[i] = (start_size[i] + 1) / 2;
hs_offset[i] = 0;
hs_stride[i] = 2;
nelmts *= hs_size[i];
@@ -1532,7 +1532,7 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name,
/* Select elements within file dataspace */
if(H5Sselect_hyperslab(fspace, H5S_SELECT_SET, hs_offset, hs_stride, hs_size, NULL) < 0) TEST_ERROR
- /* Write to all odd data locations */
+ /* Write to all even data locations */
if(H5Dwrite(dset, dtype, mspace, fspace, H5P_DEFAULT, buf) < 0) TEST_ERROR
/* Close memory dataspace */
@@ -1721,6 +1721,9 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name,
/* Verify the element read in is the value written out */
if(verify_rtn((unsigned)__LINE__, hs_offset, val_rd, buf) < 0) TEST_ERROR
+
+ /* Set the element back to fillval */
+ if(H5Dwrite(dset, dtype, mspace, fspace, H5P_DEFAULT, fillval) < 0) TEST_ERROR
/* Release any VL components */
if(H5Dvlen_reclaim(dtype, mspace, H5P_DEFAULT, val_rd) < 0) TEST_ERROR