summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/h5test.c2
-rw-r--r--test/vfd.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/test/h5test.c b/test/h5test.c
index 840e126..93f992e 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -581,7 +581,7 @@ h5_fileaccess(void)
#ifdef H5_HAVE_DIRECT
/* Linux direct read() and write() system calls. Set memory boundary, file block size,
* and copy buffer size to the default values. */
- if (H5Pset_fapl_direct(fapl, 1024, 4096, 7*4096)<0) return -1;
+ if (H5Pset_fapl_direct(fapl, 1024, 4096, 8*4096)<0) return -1;
#endif
} else {
/* Unknown driver */
diff --git a/test/vfd.c b/test/vfd.c
index fdd710d..c8b67f7 100644
--- a/test/vfd.c
+++ b/test/vfd.c
@@ -214,6 +214,7 @@ test_direct(void)
if(file_size<1*KB || file_size>4*KB)
TEST_ERROR;
+#ifdef H5_HAVE_DIRECT_ALIGN
/* Allocate aligned memory for data set 1. For data set 1, everything is aligned including
* memory address, size of data, and file address. */
if(posix_memalign(&points, (size_t)FBSIZE, (size_t)(DSET1_DIM1*DSET1_DIM2*sizeof(int)))!=0)
@@ -221,6 +222,11 @@ test_direct(void)
if(posix_memalign(&check, (size_t)FBSIZE, (size_t)(DSET1_DIM1*DSET1_DIM2*sizeof(int)))!=0)
TEST_ERROR;
+#else
+ /* Allocate aligned memory for data set 1. No need for alignment. */
+ points=(int*)malloc(DSET1_DIM1*DSET1_DIM2*sizeof(int));
+ check=(int*)malloc(DSET1_DIM1*DSET1_DIM2*sizeof(int));
+#endif
/* Initialize the dset1 */
p1 = points;