diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2014-04-09 04:16:53 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2014-04-09 04:16:53 (GMT) |
commit | c1163e0399e052856124c62a5a34bcbd92756a1a (patch) | |
tree | 470a514f8fd89c78c2997a4e663de270d35e500f /test/tselect.c | |
parent | 0dc4ce37046c373ca48ed5d186e3598d7b48ed35 (diff) | |
download | hdf5-c1163e0399e052856124c62a5a34bcbd92756a1a.zip hdf5-c1163e0399e052856124c62a5a34bcbd92756a1a.tar.gz hdf5-c1163e0399e052856124c62a5a34bcbd92756a1a.tar.bz2 |
[svn-r24995] Description:
Improve checks for NULL buffer from user during H5Dread/H5Dwrite calls.
Tested on:
Linux/32 2.4.x (jam) w/gcc
Diffstat (limited to 'test/tselect.c')
-rw-r--r-- | test/tselect.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/tselect.c b/test/tselect.c index fed405c..d5a1f4c 100644 --- a/test/tselect.c +++ b/test/tselect.c @@ -292,11 +292,15 @@ test_select_hyper(hid_t xfer_plist) ret=H5Dwrite(dataset,H5T_NATIVE_UCHAR,sid2,sid1,xfer_plist,wbuf); CHECK(ret, FAIL, "H5Dwrite"); - /* Exercise check for NULL buffer and valid selection */ + /* Exercise checks for NULL buffer and valid selection */ H5E_BEGIN_TRY { ret=H5Dwrite(dataset,H5T_NATIVE_UCHAR,sid2,sid1,xfer_plist,NULL); } H5E_END_TRY; VERIFY(ret, FAIL, "H5Dwrite"); + H5E_BEGIN_TRY { + ret=H5Dwrite(dataset,H5T_NATIVE_UCHAR,H5S_ALL,H5S_ALL,xfer_plist,NULL); + } H5E_END_TRY; + VERIFY(ret, FAIL, "H5Dwrite"); /* Close memory dataspace */ ret = H5Sclose(sid2); @@ -326,11 +330,15 @@ test_select_hyper(hid_t xfer_plist) ret=H5Dread(dataset,H5T_NATIVE_UCHAR,sid2,sid1,xfer_plist,rbuf); CHECK(ret, FAIL, "H5Dread"); - /* Exercise check for NULL buffer and valid selection */ + /* Exercise checks for NULL buffer and valid selection */ H5E_BEGIN_TRY { ret=H5Dread(dataset,H5T_NATIVE_UCHAR,sid2,sid1,xfer_plist,NULL); } H5E_END_TRY; VERIFY(ret, FAIL, "H5Dread"); + H5E_BEGIN_TRY { + ret=H5Dread(dataset,H5T_NATIVE_UCHAR,H5S_ALL,H5S_ALL,xfer_plist,NULL); + } H5E_END_TRY; + VERIFY(ret, FAIL, "H5Dread"); /* Check that the values match with a dataset iterator */ tbuf=wbuf+(15*SPACE2_DIM2); |