summaryrefslogtreecommitdiffstats
path: root/test/tfile.c
diff options
context:
space:
mode:
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 */