diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-10-26 18:07:18 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-10-26 18:07:18 (GMT) |
commit | 1fd8a32c91aa52e4c978187326d45498d7209a68 (patch) | |
tree | cda94d9db3aaf6a5121d21e646dcf5525c9c500a /test/links.c | |
parent | 2efc06789a49816350f7c56e14aad39986016bf5 (diff) | |
download | hdf5-1fd8a32c91aa52e4c978187326d45498d7209a68.zip hdf5-1fd8a32c91aa52e4c978187326d45498d7209a68.tar.gz hdf5-1fd8a32c91aa52e4c978187326d45498d7209a68.tar.bz2 |
[svn-r19668] Description:
Do some extra range-checking on H5Pset_elink_acc_flags() calls.
Clean up some minor compiler warnings also.
Tested on:
Mac OS X/32 10.6.4 (amazon) w/debug & production
(too minor to require h5committest)
Diffstat (limited to 'test/links.c')
-rw-r--r-- | test/links.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/links.c b/test/links.c index 12b8ba4..3596f1f 100644 --- a/test/links.c +++ b/test/links.c @@ -4033,6 +4033,7 @@ external_set_elink_acc_flags(hid_t fapl, hbool_t new_format) hid_t file1 = -1, file2 = -1, group = -1, subgroup = -1, gapl = -1; char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE]; + herr_t ret; unsigned flags; if(new_format) @@ -4083,6 +4084,24 @@ external_set_elink_acc_flags(hid_t fapl, hbool_t new_format) } H5E_END_TRY; if(subgroup != FAIL) TEST_ERROR + /* Attempt to set invalid flags on gapl */ + H5E_BEGIN_TRY { + ret = H5Pset_elink_acc_flags(gapl, H5F_ACC_TRUNC); + } H5E_END_TRY; + if(ret != FAIL) TEST_ERROR + H5E_BEGIN_TRY { + ret = H5Pset_elink_acc_flags(gapl, H5F_ACC_EXCL); + } H5E_END_TRY; + if(ret != FAIL) TEST_ERROR + H5E_BEGIN_TRY { + ret = H5Pset_elink_acc_flags(gapl, H5F_ACC_DEBUG); + } H5E_END_TRY; + if(ret != FAIL) TEST_ERROR + H5E_BEGIN_TRY { + ret = H5Pset_elink_acc_flags(gapl, H5F_ACC_CREAT); + } H5E_END_TRY; + if(ret != FAIL) TEST_ERROR + /* Close file1 and group */ if(H5Gclose(group) < 0) TEST_ERROR if(H5Fclose(file1) < 0) TEST_ERROR |