diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-03-26 18:31:00 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-03-26 18:31:00 (GMT) |
commit | 505b31ee08bfd3efc62df84e00602a9fd6c46a4f (patch) | |
tree | 77c1e8cd2a59bfb655f789fd6ddac4e74b4fe5c9 /test/vfd.c | |
parent | 5f2e591745df8a05950c07e4c86de00d6678828e (diff) | |
download | hdf5-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.c | 25 |
1 files changed, 24 insertions, 1 deletions
@@ -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) |