summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2006-10-18 20:20:32 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2006-10-18 20:20:32 (GMT)
commit4d32eb160bd41628638d9aa2e7239f85b6b28250 (patch)
treeeb36947c0b9733a282e1636d16f61e09f7086ff7 /test
parentd4daafbc853cbc85c6594d540e6d3a192e95f78f (diff)
downloadhdf5-4d32eb160bd41628638d9aa2e7239f85b6b28250.zip
hdf5-4d32eb160bd41628638d9aa2e7239f85b6b28250.tar.gz
hdf5-4d32eb160bd41628638d9aa2e7239f85b6b28250.tar.bz2
[svn-r12776] The internal change is to make the 3 parameters of H5Pset_fapl_direct be a structure and passed
through driver info functions in H5FD_direct_open, H5FD_direct_read, and H5FD_direct_write. The external change is to add a new API function H5Pget_fapl_direct to query 3 control values, the memory boundary, file system block size, and the maximal buffer size for copying data.
Diffstat (limited to 'test')
-rw-r--r--test/vfd.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/vfd.c b/test/vfd.c
index e42f643..02e2478 100644
--- a/test/vfd.c
+++ b/test/vfd.c
@@ -27,6 +27,9 @@
#define FAMILY_SIZE2 (5*KB)
#define MULTI_SIZE 128
#define CORE_INCREMENT (4*KB)
+#define MBOUNDARY 512
+#define FBSIZE 4096
+#define CBSIZE 64*1024*1024
const char *FILENAME[] = {
"sec2_file",
@@ -142,6 +145,9 @@ test_direct(void)
char filename[1024];
int *fhandle=NULL;
hsize_t file_size;
+ hsize_t mbound;
+ hsize_t fbsize;
+ hsize_t cbsize;
#endif /*H5_HAVE_DIRECT*/
TESTING("Direct I/O file driver");
@@ -154,10 +160,16 @@ test_direct(void)
/* Set property list and file name for Direct driver. Set memory alignment boundary
* and file block size to 512 which is the minimum for Linux 2.6. */
fapl = h5_fileaccess();
- if(H5Pset_fapl_direct(fapl, 512, 4096, 64*1024*1024)<0)
+ if(H5Pset_fapl_direct(fapl, MBOUNDARY, FBSIZE, CBSIZE)<0)
TEST_ERROR;
h5_fixname(FILENAME[4], fapl, filename, sizeof filename);
+ /* Verify the file access properties */
+ if(H5Pget_fapl_direct(fapl, &mbound, &fbsize, &cbsize)<0)
+ TEST_ERROR;
+ if(mbound != MBOUNDARY || fbsize != FBSIZE || cbsize != CBSIZE)
+ TEST_ERROR;
+
if((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
TEST_ERROR;