summaryrefslogtreecommitdiffstats
path: root/test/dsets.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2014-04-16 15:33:08 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2014-04-16 15:33:08 (GMT)
commit66fb0ea64e2c26f36da922b75ce1fed1fa79d123 (patch)
tree386e6a19505679a365439a4cf7658bb2c8019fde /test/dsets.c
parentc45423a13de0939385a1cdd2eb969a9c478febc0 (diff)
downloadhdf5-66fb0ea64e2c26f36da922b75ce1fed1fa79d123.zip
hdf5-66fb0ea64e2c26f36da922b75ce1fed1fa79d123.tar.gz
hdf5-66fb0ea64e2c26f36da922b75ce1fed1fa79d123.tar.bz2
[svn-r25050] Description:
Bring r24995 and r24998 from the trunk to the 1.8 branch: r24995: Improve checks for NULL buffer from user during H5Dread/H5Dwrite calls. r24998: Check in Neil's changes for correctly handling case where library is reinitialized through a deprecated routine. Tested on: Mac OSX/64 10.9.2 (amazon) w/serial & paralle (change has baked on trunk for >7 days)
Diffstat (limited to 'test/dsets.c')
-rw-r--r--test/dsets.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/dsets.c b/test/dsets.c
index 54b88bc..85949bb 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -6690,8 +6690,17 @@ test_zero_dims(hid_t file)
if(H5Pset_chunk(dcpl, 1, &csize) < 0) FAIL_STACK_ERROR
if((d = H5Dcreate2(file, ZERODIM_DATASET, H5T_NATIVE_INT, s, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
- /* Just a no-op */
+ /* Various no-op writes */
if(H5Dwrite(d, H5T_NATIVE_INT, s, s, H5P_DEFAULT, (void*)911) < 0) FAIL_STACK_ERROR
+ if(H5Dwrite(d, H5T_NATIVE_INT, s, s, H5P_DEFAULT, NULL) < 0) FAIL_STACK_ERROR
+ if(H5Dwrite(d, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void*)911) < 0) FAIL_STACK_ERROR
+ if(H5Dwrite(d, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, NULL) < 0) FAIL_STACK_ERROR
+
+ /* Various no-op reads */
+ if(H5Dread(d, H5T_NATIVE_INT, s, s, H5P_DEFAULT, (void*)911) < 0) FAIL_STACK_ERROR
+ if(H5Dread(d, H5T_NATIVE_INT, s, s, H5P_DEFAULT, NULL) < 0) FAIL_STACK_ERROR
+ if(H5Dread(d, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void*)911) < 0) FAIL_STACK_ERROR
+ if(H5Dread(d, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, NULL) < 0) FAIL_STACK_ERROR
if(H5Dclose(d) < 0) FAIL_STACK_ERROR
if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR