summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJerome Soumagne <jsoumagne@hdfgroup.org>2019-11-26 21:50:08 (GMT)
committerJerome Soumagne <jsoumagne@hdfgroup.org>2019-11-26 21:50:08 (GMT)
commit6b68cc352ffabb5fe997db1eb52216b3ee80e669 (patch)
treeff141b2b504db24deab1799be4a548d8fc660c1f /test
parentb8a56718e40efaf6954a760984b9d513dbff8f7d (diff)
downloadhdf5-6b68cc352ffabb5fe997db1eb52216b3ee80e669.zip
hdf5-6b68cc352ffabb5fe997db1eb52216b3ee80e669.tar.gz
hdf5-6b68cc352ffabb5fe997db1eb52216b3ee80e669.tar.bz2
H5R: fix H5Tconv to check for null references
Valid for both deprecated and non-deprecated references Update test
Diffstat (limited to 'test')
-rw-r--r--test/trefer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/trefer.c b/test/trefer.c
index 7d87ea9..0f9e4f9 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -793,7 +793,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
} H5E_END_TRY;
if(libver_high < H5F_LIBVER_V110)
- VERIFY(ret, FAIL, "H5Dread");
+ CHECK(ret, FAIL, "H5Dread");
else {
CHECK(ret, FAIL, "H5Dread");
@@ -2102,7 +2102,7 @@ test_reference_compat_conv(void)
hid_t tid1, tid2; /* Datatype ID */
hsize_t dims1[] = {SPACE1_DIM1},
dims2[] = {SPACE2_DIM1, SPACE2_DIM2},
- dims3[] = {2};
+ dims3[] = {SPACE1_DIM1}; /* Purposedly set dimension larger to test NULL references */
hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */
hsize_t stride[SPACE2_RANK];/* Stride of hyperslab */
hsize_t count[SPACE2_RANK]; /* Element count of hyperslab */
@@ -2122,8 +2122,8 @@ test_reference_compat_conv(void)
/* Allocate write & read buffers */
wbuf_obj = (hobj_ref_t *)HDcalloc(sizeof(hobj_ref_t), SPACE1_DIM1);
rbuf_obj = (H5R_ref_t *)HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- wbuf_reg = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), 2);
- rbuf_reg = (H5R_ref_t *)HDcalloc(sizeof(H5R_ref_t), 2);
+ wbuf_reg = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1);
+ rbuf_reg = (H5R_ref_t *)HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
/* Create file */
fid1 = H5Fcreate(FILE_REF_COMPAT, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);