summaryrefslogtreecommitdiffstats
path: root/test/tfile.c
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2012-08-13 20:04:20 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2012-08-13 20:04:20 (GMT)
commita9602d1b34e462e7dc4af611cf08486694750863 (patch)
tree2746ef757084da7a7de5a4474dfcb3d9ff2c8a22 /test/tfile.c
parenteb4fd07b5ac8d70b9578fed95890e2af309fa20f (diff)
downloadhdf5-a9602d1b34e462e7dc4af611cf08486694750863.zip
hdf5-a9602d1b34e462e7dc4af611cf08486694750863.tar.gz
hdf5-a9602d1b34e462e7dc4af611cf08486694750863.tar.bz2
[svn-r22676] Changes needed to make the default free-list mapping from H5FD_FLMAP_SINGLE to H5FD_FLMAP_DICHOTOMY.
Diffstat (limited to 'test/tfile.c')
-rw-r--r--test/tfile.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/test/tfile.c b/test/tfile.c
index 53ca035..8ee0b64 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -1340,6 +1340,11 @@ test_file_perm2(void)
** This test checks the free space available in a file in various
** situations.
**
+** Modifications:
+** Vailin Choi; July 2012
+** Remove datasets in reverse order so that all file spaces are shrunk.
+** (A change due to H5FD_FLMAP_DICHOTOMY.)
+**
*****************************************************************/
static void
test_file_freespace(void)
@@ -1351,6 +1356,7 @@ test_file_freespace(void)
hid_t dspace; /* Dataspace ID */
hid_t dset; /* Dataset ID */
hid_t dcpl; /* Dataset creation property list */
+ int k; /* Local index variable */
unsigned u; /* Local index variable */
char name[32]; /* Dataset name */
herr_t ret;
@@ -1410,11 +1416,11 @@ test_file_freespace(void)
/* Check that there is the right amount of free space in the file */
free_space = H5Fget_freespace(file);
CHECK(free_space, FAIL, "H5Fget_freespace");
- VERIFY(free_space, 2008, "H5Fget_freespace");
+ VERIFY(free_space, 2360, "H5Fget_freespace");
/* Delete datasets in file */
- for(u = 0; u < 10; u++) {
- sprintf(name, "Dataset %u", u);
+ for(k = 9; k >= 0; k--) {
+ sprintf(name, "Dataset %u", (unsigned)k);
ret = H5Ldelete(file, name, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Ldelete");
} /* end for */