diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-08-24 19:09:36 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-08-24 19:09:36 (GMT) |
commit | b6494f0fc9159fae1418e033126826cf61a3ff21 (patch) | |
tree | d69e857ee6484f6e716400d92f2b8dae61b0e627 /test/tsohm.c | |
parent | 81e3eef99a7c0363d10c4d8972163da25a0da662 (diff) | |
download | hdf5-b6494f0fc9159fae1418e033126826cf61a3ff21.zip hdf5-b6494f0fc9159fae1418e033126826cf61a3ff21.tar.gz hdf5-b6494f0fc9159fae1418e033126826cf61a3ff21.tar.bz2 |
[svn-r17415] Description:
Bring r17408, 17411, 17412, 17413 & 17414 from trunk back to 1.8 branch:
r17408:
Move flush operation on mounted file hierarchy into H5Fmount module.
r17411:
Make H5AC_flush just flush the cache and make H5AC_dest perform the
proper parallel synchronization before destroying the cache. Also, further
discriminate between 'closing' and 'non-closing' actions in H5F_flush.
r17412:
Seperate 'flush' functionality from 'destroy' functionality at the
H5F level also.
r17413:
Remove vestigial intermediate routine for flushing file and move it
into API routine. Also, remove private, unused (now) 'H5F_FLUSH_DOWN' symbol
from public header file.
r17414:
Flush the core VFD's buffer before closing the file, also flush the
metadata accumulator before reseting it. Write the driver info message out
in the superblock flush routine more directly, instead of using wrapper
routine, since the wrapper routine won't work when the superblock is being
shutdown.
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
(h5committest performed on trunk)
Diffstat (limited to 'test/tsohm.c')
-rw-r--r-- | test/tsohm.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/test/tsohm.c b/test/tsohm.c index 348677d..b5b489b 100644 --- a/test/tsohm.c +++ b/test/tsohm.c @@ -544,8 +544,12 @@ error: static hid_t close_reopen_file(hid_t file, const char* filename, hid_t fapl_id) { - if(H5Fclose(file) < 0) goto error; - return H5Fopen(filename, H5F_ACC_RDWR, fapl_id); + hid_t fid; + + if(H5Fclose(file) < 0) FAIL_STACK_ERROR + if((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl_id)) < 0) FAIL_STACK_ERROR + + return(fid); error: return -1; @@ -598,19 +602,19 @@ size1_helper(hid_t file, const char* filename, hid_t fapl_id, int test_file_clos dim1[0] = 1; if((space_id=H5Screate_simple(1,dim1,NULL)) < 0) TEST_ERROR - if((dset_id = H5Dcreate2(file,DSETNAME[0],dtype1_id,space_id,H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR + if((dset_id = H5Dcreate2(file,DSETNAME[0],dtype1_id,space_id,H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR /* Test writing and reading */ - if(H5Dwrite(dset_id,dtype1_id,H5S_ALL,H5S_ALL,H5P_DEFAULT,&wdata) < 0) TEST_ERROR + if(H5Dwrite(dset_id,dtype1_id,H5S_ALL,H5S_ALL,H5P_DEFAULT,&wdata) < 0) FAIL_STACK_ERROR - if(H5Dread(dset_id,dtype1_id,H5S_ALL,H5S_ALL,H5P_DEFAULT,&rdata) < 0) TEST_ERROR + if(H5Dread(dset_id,dtype1_id,H5S_ALL,H5S_ALL,H5P_DEFAULT,&rdata) < 0) FAIL_STACK_ERROR if(rdata.i1!=wdata.i1 || rdata.i2!=wdata.i2 || HDstrcmp(rdata.str, wdata.str)) { H5_FAILED(); AT(); printf("incorrect read data\n"); goto error; } /* end if */ - if(H5Dclose(dset_id) < 0) TEST_ERROR + if(H5Dclose(dset_id) < 0) FAIL_STACK_ERROR /* Close and re-open the file if requested*/ if(test_file_closing) { @@ -618,8 +622,8 @@ size1_helper(hid_t file, const char* filename, hid_t fapl_id, int test_file_clos } /* Create more datasets with the same datatype */ - if((dset_id = H5Dcreate2(file,DSETNAME[1],dtype1_id,space_id,H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Dclose(dset_id) < 0) TEST_ERROR + if((dset_id = H5Dcreate2(file,DSETNAME[1],dtype1_id,space_id,H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR + if(H5Dclose(dset_id) < 0) FAIL_STACK_ERROR /* Close and re-open the file if requested*/ if(test_file_closing) { |