summaryrefslogtreecommitdiffstats
path: root/test/gen_bogus.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2015-06-27 05:51:04 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2015-06-27 05:51:04 (GMT)
commit58a95d0d4a593157bb7e77f71347ee50783a11a0 (patch)
tree7a54c739616d9beabbbb8202ca0df568413ab040 /test/gen_bogus.c
parentdf8bd7ccd6cd8d50280a3a7d862064c6340e2169 (diff)
downloadhdf5-58a95d0d4a593157bb7e77f71347ee50783a11a0.zip
hdf5-58a95d0d4a593157bb7e77f71347ee50783a11a0.tar.gz
hdf5-58a95d0d4a593157bb7e77f71347ee50783a11a0.tar.bz2
[svn-r27292] Description:
Bring 'fail if unknown always' object header message flag from the avoid_truncate branch, strengthen error checking for unknown messages, and try to catch object header code configurations at compile time (instead of runtime). Tested on: MacOSX/64 10.10.3 (amazon) w/serial & parallel (h5committest forthcoming)
Diffstat (limited to 'test/gen_bogus.c')
-rw-r--r--test/gen_bogus.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/test/gen_bogus.c b/test/gen_bogus.c
index df1e81f..e9ce686 100644
--- a/test/gen_bogus.c
+++ b/test/gen_bogus.c
@@ -61,7 +61,7 @@ int main(void)
if((did = H5Dcreate2(fid, "/Dataset1", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) goto error;
if(H5Dclose(did) < 0) goto error;
- /* Set "fail if unknown" message flag for bogus message */
+ /* Set "fail if unknown and open for write" message flag for bogus message */
bogus_flags = H5O_MSG_FLAG_FAIL_IF_UNKNOWN_AND_OPEN_FOR_WRITE;
if(H5Pset(dcpl, H5O_BOGUS_MSG_FLAGS_NAME, &bogus_flags) < 0) goto error;
@@ -69,12 +69,20 @@ int main(void)
if((did = H5Dcreate2(fid, "/Dataset2", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) goto error;
if(H5Dclose(did) < 0) goto error;
+ /* Set "fail if unknown always" message flag for bogus message */
+ bogus_flags = H5O_MSG_FLAG_FAIL_IF_UNKNOWN_ALWAYS;
+ if(H5Pset(dcpl, H5O_BOGUS_MSG_FLAGS_NAME, &bogus_flags) < 0) goto error;
+
+ /* Create third dataset, with "fail if unknown always" message flag */
+ if((did = H5Dcreate2(fid, "/Dataset3", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) goto error;
+ if(H5Dclose(did) < 0) goto error;
+
/* Set "mark if unknown" message flag for bogus message */
bogus_flags = H5O_MSG_FLAG_MARK_IF_UNKNOWN;
if(H5Pset(dcpl, H5O_BOGUS_MSG_FLAGS_NAME, &bogus_flags) < 0) goto error;
- /* Create second dataset, with "mark if unknown" message flag */
- if((did = H5Dcreate2(fid, "/Dataset3", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) goto error;
+ /* Create fourth dataset, with "mark if unknown" message flag */
+ if((did = H5Dcreate2(fid, "/Dataset4", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) goto error;
if(H5Dclose(did) < 0) goto error;
/* Close dataset creation property list */