summaryrefslogtreecommitdiffstats
path: root/test/file_handle.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2004-11-18 16:52:12 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2004-11-18 16:52:12 (GMT)
commit7016b6e5ed1870eba265ac1a06b1683106a18420 (patch)
tree2285e668b05a78b92f038f79391f5e3610f97fc0 /test/file_handle.c
parent1878ad9c2cc038e1739887b12a26512daf76eefc (diff)
downloadhdf5-7016b6e5ed1870eba265ac1a06b1683106a18420.zip
hdf5-7016b6e5ed1870eba265ac1a06b1683106a18420.tar.gz
hdf5-7016b6e5ed1870eba265ac1a06b1683106a18420.tar.bz2
[svn-r9539]
Purpose: Correction to previous bug fix. This checkin is mainly to let user test his program. Description: For family driver bug(#213), the previous fix was imperfect. The problem was when user create family file, the member size information wasn't saved in file. When the file was re-opened, the library simply use the size of 1st member file as member size. Solution: When file is re-opened, member size passed in from access property is checked to see if it's reasonable. If there is only 1 member file, member size can't be smaller than current member size. If there are at least 2 member files, member size can only be equal to the 1st member size. Platforms tested: h5committest and fuss
Diffstat (limited to 'test/file_handle.c')
-rw-r--r--test/file_handle.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/test/file_handle.c b/test/file_handle.c
index c50a749..a9c8155 100644
--- a/test/file_handle.c
+++ b/test/file_handle.c
@@ -243,16 +243,11 @@ test_family(void)
goto error;
/* Tries to reopen the file with member file size smaller than
- * actual 1st member file size(976 bytes). Supposed to fail. */
+ * actual 1st member file size(976 bytes). The library is
+ * supposed to adjust the member size to 976 bytes. */
if(H5Pset_fapl_family(fapl, (hsize_t)512, H5P_DEFAULT)<0)
goto error;
- H5E_BEGIN_TRY {
- H5Fopen(filename, H5F_ACC_RDWR, fapl);
- } H5E_END_TRY;
-
- /* Reopen the file with original member file size */
- if(H5Pset_fapl_family(fapl, (hsize_t)FAMILY_SIZE, H5P_DEFAULT)<0)
- goto error;
+
if((file=H5Fopen(filename, H5F_ACC_RDWR, fapl))<0)
goto error;
@@ -315,7 +310,7 @@ test_family(void)
if(file_size<32*KB || file_size>40*KB)
goto error;
}
-
+
if(H5Sclose(space)<0)
goto error;
if(H5Dclose(dset)<0)