summaryrefslogtreecommitdiffstats
path: root/test/links.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-10-27 01:54:11 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-10-27 01:54:11 (GMT)
commit901afe107a24b24c9fd019b5881afb5966b38665 (patch)
tree214a0adf5b055e4de2c561b02856baba3041ddfe /test/links.c
parente293748ca2098a5d8867011d246c2d5907285191 (diff)
downloadhdf5-901afe107a24b24c9fd019b5881afb5966b38665.zip
hdf5-901afe107a24b24c9fd019b5881afb5966b38665.tar.gz
hdf5-901afe107a24b24c9fd019b5881afb5966b38665.tar.bz2
[svn-r19671] Description:
Bring r19668 from trunk to 1.8 branch: 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.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/links.c b/test/links.c
index 6b035d1..8e24515 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