summaryrefslogtreecommitdiffstats
path: root/test/tsohm.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-08-24 00:50:39 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-08-24 00:50:39 (GMT)
commitfef512498112dfb76a6f22f643e9588fdb47b31e (patch)
tree1b71c8f7f6b3eabfcf94a630a521cf3ec1f9287b /test/tsohm.c
parent02775c23496a72bb16f11bc3630de3b7649e14f6 (diff)
downloadhdf5-fef512498112dfb76a6f22f643e9588fdb47b31e.zip
hdf5-fef512498112dfb76a6f22f643e9588fdb47b31e.tar.gz
hdf5-fef512498112dfb76a6f22f643e9588fdb47b31e.tar.bz2
[svn-r17411] Description:
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. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/Intel compilers w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.5.8 (amazon) in debug mode Mac OS X/32 10.5.8 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'test/tsohm.c')
-rw-r--r--test/tsohm.c20
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) {