diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2013-10-10 13:21:07 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2013-10-10 13:21:07 (GMT) |
commit | dfd9816c8d5ea707dfb2a19adad3176c7a15c5d2 (patch) | |
tree | 2444b8b5f3311512f8ab2df0691ab571ee0ab122 /test/links.c | |
parent | 39fc26566e18ac81c43986ed2013676e2918ded2 (diff) | |
download | hdf5-dfd9816c8d5ea707dfb2a19adad3176c7a15c5d2.zip hdf5-dfd9816c8d5ea707dfb2a19adad3176c7a15c5d2.tar.gz hdf5-dfd9816c8d5ea707dfb2a19adad3176c7a15c5d2.tar.bz2 |
[svn-r24279] Merge of r24278 from revise_chunks.
Changes the MD cache so that writing v-1 B-tree nodes under SWMR
semantics will fail.
Tested on: jam (previously tested on more platforms)
Diffstat (limited to 'test/links.c')
-rw-r--r-- | test/links.c | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/test/links.c b/test/links.c index ffa4024..0bcfd31 100644 --- a/test/links.c +++ b/test/links.c @@ -4032,40 +4032,41 @@ external_set_elink_acc_flags(hid_t fapl, hbool_t new_format) if(H5Gclose(group) < 0) TEST_ERROR if(H5Fclose(file1) < 0) TEST_ERROR - /* Reopen file1, with read-write and SWMR-write access */ - if((file1 = H5Fopen(filename1, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl)) < 0) FAIL_STACK_ERROR - - /* Open a group through the external link using default gapl */ - if((group = H5Gopen2(file1, "/ext_link/group", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR + /* Only supported under the latest file format */ + if(new_format) { + if((file1 = H5Fopen(filename1, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl)) < 0) FAIL_STACK_ERROR - /* Verify that the correct parameters have been set on file2 */ - if((file2 = H5Iget_file_id(group)) < 0) FAIL_STACK_ERROR - if(H5Fget_intent(file2, &flags) < 0) FAIL_STACK_ERROR - if(flags != (H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE)) TEST_ERROR + /* Open a group through the external link using default gapl */ + if((group = H5Gopen2(file1, "/ext_link/group", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR - /* Close file2 and group */ - if(H5Gclose(group) < 0) FAIL_STACK_ERROR - if(H5Fclose(file2) < 0) FAIL_STACK_ERROR + /* Verify that the correct parameters have been set on file2 */ + if((file2 = H5Iget_file_id(group)) < 0) FAIL_STACK_ERROR + if(H5Fget_intent(file2, &flags) < 0) FAIL_STACK_ERROR + if(flags != (H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE)) TEST_ERROR - /* Set elink access flags on gapl to be H5F_ACC_RDWR (dropping SWMR_WRITE) */ - if(H5Pset_elink_acc_flags(gapl, H5F_ACC_RDWR) < 0) FAIL_STACK_ERROR + /* Close file2 and group */ + if(H5Gclose(group) < 0) FAIL_STACK_ERROR + if(H5Fclose(file2) < 0) FAIL_STACK_ERROR - /* Open a group through the external link using gapl */ - if((group = H5Gopen2(file1, "/ext_link/group", gapl)) < 0) FAIL_STACK_ERROR + /* Set elink access flags on gapl to be H5F_ACC_RDWR (dropping SWMR_WRITE) */ + if(H5Pset_elink_acc_flags(gapl, H5F_ACC_RDWR) < 0) FAIL_STACK_ERROR - /* Verify that the correct parameters have been set on file2 */ - if((file2 = H5Iget_file_id(group)) < 0) FAIL_STACK_ERROR - if(H5Fget_intent(file2, &flags) < 0) FAIL_STACK_ERROR - if(flags != H5F_ACC_RDWR) TEST_ERROR + /* Open a group through the external link using gapl */ + if((group = H5Gopen2(file1, "/ext_link/group", gapl)) < 0) FAIL_STACK_ERROR - /* Close file2 and group */ - if(H5Gclose(group) < 0) FAIL_STACK_ERROR - if(H5Fclose(file2) < 0) FAIL_STACK_ERROR + /* Verify that the correct parameters have been set on file2 */ + if((file2 = H5Iget_file_id(group)) < 0) FAIL_STACK_ERROR + if(H5Fget_intent(file2, &flags) < 0) FAIL_STACK_ERROR + if(flags != H5F_ACC_RDWR) TEST_ERROR - /* Close file1 */ - if(H5Fclose(file1) < 0) TEST_ERROR + /* Close file2 and group */ + if(H5Gclose(group) < 0) FAIL_STACK_ERROR + if(H5Fclose(file2) < 0) FAIL_STACK_ERROR + /* Close file1 */ + if(H5Fclose(file1) < 0) TEST_ERROR + } /* Reopen file1, with read-only and SWMR-read access */ if((file1 = H5Fopen(filename1, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0) FAIL_STACK_ERROR |