summaryrefslogtreecommitdiffstats
path: root/test/vfd.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-03-26 18:31:00 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-03-26 18:31:00 (GMT)
commit505b31ee08bfd3efc62df84e00602a9fd6c46a4f (patch)
tree77c1e8cd2a59bfb655f789fd6ddac4e74b4fe5c9 /test/vfd.c
parent5f2e591745df8a05950c07e4c86de00d6678828e (diff)
downloadhdf5-505b31ee08bfd3efc62df84e00602a9fd6c46a4f.zip
hdf5-505b31ee08bfd3efc62df84e00602a9fd6c46a4f.tar.gz
hdf5-505b31ee08bfd3efc62df84e00602a9fd6c46a4f.tar.bz2
[svn-r16619] Description:
Bring r16606:16618 from trunk to the revise_chunks branch. Tested on: FreeBSD/32 6.3 (duty) h5committest not necessary on this branch
Diffstat (limited to 'test/vfd.c')
-rw-r--r--test/vfd.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/test/vfd.c b/test/vfd.c
index 310b931..57798a5 100644
--- a/test/vfd.c
+++ b/test/vfd.c
@@ -802,6 +802,8 @@ static herr_t
test_family_compat(void)
{
hid_t file = (-1), fapl;
+ hid_t dset;
+ char dname[]="dataset";
char filename[1024];
char pathname[1024];
char *srcdir = getenv("srcdir"); /*where the src code is located*/
@@ -824,7 +826,28 @@ test_family_compat(void)
}
HDstrcat(pathname, filename);
- if((file = H5Fopen(pathname, H5F_ACC_RDONLY, fapl)) < 0)
+ /* Make sure we can open the file. Use the read and write mode to flush the
+ * superblock. */
+ if((file = H5Fopen(pathname, H5F_ACC_RDWR, fapl)) < 0)
+ TEST_ERROR;
+
+ if((dset = H5Dopen2(file, dname, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ if(H5Dclose(dset) < 0)
+ TEST_ERROR;
+
+ if(H5Fclose(file) < 0)
+ TEST_ERROR;
+
+ /* Open the file again to make sure it isn't corrupted. */
+ if((file = H5Fopen(pathname, H5F_ACC_RDWR, fapl)) < 0)
+ TEST_ERROR;
+
+ if((dset = H5Dopen2(file, dname, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ if(H5Dclose(dset) < 0)
TEST_ERROR;
if(H5Fclose(file) < 0)