summaryrefslogtreecommitdiffstats
path: root/test/vfd.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2007-03-15 21:17:09 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2007-03-15 21:17:09 (GMT)
commit24fb6ed7c69e5a3f372c6b65eae8fa4ccba8db13 (patch)
treea4bbeb35f36623e14d575cd44a73076f67b3f08f /test/vfd.c
parent4a6abb3ac5c42efdfc3ffba6173bd3c3a1d330fd (diff)
downloadhdf5-24fb6ed7c69e5a3f372c6b65eae8fa4ccba8db13.zip
hdf5-24fb6ed7c69e5a3f372c6b65eae8fa4ccba8db13.tar.gz
hdf5-24fb6ed7c69e5a3f372c6b65eae8fa4ccba8db13.tar.bz2
[svn-r13517] To deal with the situation that compiler supports direct I/O but file system doesn't, added a
condition check of writing aligned data. Skip the test for direct VFD if it's this situation.
Diffstat (limited to 'test/vfd.c')
-rw-r--r--test/vfd.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/vfd.c b/test/vfd.c
index 825a191..dd79e32 100644
--- a/test/vfd.c
+++ b/test/vfd.c
@@ -188,8 +188,15 @@ test_direct(void)
if(H5Pset_alignment(fapl, (hsize_t)THRESHOLD, (hsize_t)FBSIZE)<0)
TEST_ERROR;
- if((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
- TEST_ERROR;
+ H5E_BEGIN_TRY {
+ file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
+ } H5E_END_TRY;
+ if(file<0) {
+ H5Pclose (fapl);
+ SKIPPED();
+ printf(" Probably the file system doesn't support Direct I/O\n");
+ return 0;
+ }
/* Retrieve the access property list... */
if ((access_fapl = H5Fget_access_plist(file)) < 0)