summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2003-04-16 19:06:15 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2003-04-16 19:06:15 (GMT)
commitdf785657a5ac5f8f7d12bf68de47d60922e01993 (patch)
tree34656b3cd13341556d57710009cd47215e2b5002
parentf3a0dc2b3d4b499cb9a9b53d96daf7f5167abcea (diff)
downloadhdf5-df785657a5ac5f8f7d12bf68de47d60922e01993.zip
hdf5-df785657a5ac5f8f7d12bf68de47d60922e01993.tar.gz
hdf5-df785657a5ac5f8f7d12bf68de47d60922e01993.tar.bz2
[svn-r6688] Purpose:
Bug Fix Description: When using the STDIO driver, the dsets test would fail. Solution: Need to flush the data to disk before doing an HDopen call. Platforms tested: Modi4 (Parallel & Fortran) Arabica (Fortran) Verbena (Fortran & C++) Misc. update:
-rw-r--r--test/dsets.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/dsets.c b/test/dsets.c
index 3f5d960..c91c5a0 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -19,7 +19,9 @@
* Purpose: Tests the dataset interface (H5D)
*/
+#include <stdlib.h>
#include <time.h>
+
#include "h5test.h"
/*
@@ -174,6 +176,7 @@ test_create(hid_t file)
* Open the dataset we created above and then close it. This is how
* existing datasets are accessed.
*/
+ if (H5Fflush(file, H5F_SCOPE_GLOBAL) < 0) goto error;
if ((dataset = H5Dopen(file, DSET_DEFAULT_NAME))<0) goto error;
if (H5Dclose(dataset) < 0) goto error;
@@ -320,6 +323,7 @@ test_simple_io(hid_t file, char *fname)
* compare it with the data written in.*/
if((offset=H5Dget_offset(dataset))==HADDR_UNDEF) goto error;
+ H5Fflush(file, H5F_SCOPE_GLOBAL);
f = HDopen(fname, O_RDONLY, 0);
HDlseek(f, (off_t)offset, SEEK_SET);
HDread(f, rdata, sizeof(int)*100*200);
@@ -420,6 +424,7 @@ test_userblock_offset(hid_t fapl)
* compare it with the data written in.*/
if((offset=H5Dget_offset(dataset))==HADDR_UNDEF) goto error;
+ H5Fflush(file, H5F_SCOPE_GLOBAL);
f = HDopen(filename, O_RDONLY, 0);
HDlseek(f, (off_t)offset, SEEK_SET);
HDread(f, rdata, sizeof(int)*100*200);
@@ -438,6 +443,7 @@ test_userblock_offset(hid_t fapl)
HDclose(f);
+ H5Fflush(file, H5F_SCOPE_GLOBAL);
H5Dclose(dataset);
H5Fclose(file);
PASSED();