summaryrefslogtreecommitdiffstats
path: root/test/tsohm.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-03-08 20:10:12 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-03-08 20:10:12 (GMT)
commit74a30fff3e0fcd8919ced487abd03eefd27d57c1 (patch)
tree2df0a0d2cfc51cce067f25e503e6dfd26c8e827d /test/tsohm.c
parent25bb6f5dd8af42d2facaab26f0cdeb7fc76456ae (diff)
downloadhdf5-74a30fff3e0fcd8919ced487abd03eefd27d57c1.zip
hdf5-74a30fff3e0fcd8919ced487abd03eefd27d57c1.tar.gz
hdf5-74a30fff3e0fcd8919ced487abd03eefd27d57c1.tar.bz2
[svn-r13477] Description:
The main purpose of this checkin was to eliminate the space used for tracking creation time indices when there is no way they can be used (i.e. attributes can't be shared in the file and the user hasn't turned on attribute creation tracking), however there were some other minor changes which crept in: - Fix a cache locking deadlock when a shared attribute and one of its components end up in the same fractal heap direct block. (This is fixed the "slow" way for right now, until John has time to add support for readers/writer locking to the cache. - Optimize attribute copying when a copy will be kept during a v2 B-tree search. - When freeing a block on disk, attempt to merge it with the metadata and "small data" aggregators. Tested on: Mac OS X/32 10.4.8 (amazon) FreeBSD/32 6.2 (duty)
Diffstat (limited to 'test/tsohm.c')
-rw-r--r--test/tsohm.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/test/tsohm.c b/test/tsohm.c
index f5a6514..0612794 100644
--- a/test/tsohm.c
+++ b/test/tsohm.c
@@ -2200,8 +2200,8 @@ static void test_sohm_size2(int close_reopen)
*/
if(list_index_med.dsets2 >= btree_index.dsets2)
VERIFY(list_index_med.dsets2, 1, "h5_get_file_size");
- if(btree_index.dsets2 > list_index_small.dsets2)
- VERIFY(btree_index.dsets2, 1, "h5_get_file_size");
+ if(btree_index.dsets2 > list_index_small.dsets2 * OVERHEAD_ALLOWED)
+ VERIFY(btree_index.dsets2, list_index_small.dsets2, "h5_get_file_size");
if(list_index_small.dsets2 >= norm_sizes.dsets2)
VERIFY(btree_index.dsets2, 1, "h5_get_file_size");
/* If the small list (now a B-tree) is bigger than the existing B-tree,
@@ -2233,8 +2233,8 @@ static void test_sohm_size2(int close_reopen)
*/
if(list_index_med.interleaved >= btree_index.interleaved)
VERIFY(0, 1, "h5_get_file_size");
- if(btree_index.interleaved > list_index_small.interleaved)
- VERIFY(0, 1, "h5_get_file_size");
+ if(btree_index.interleaved > list_index_small.interleaved * OVERHEAD_ALLOWED)
+ VERIFY(btree_index.interleaved, list_index_small.interleaved, "h5_get_file_size");
if(list_index_small.interleaved >= norm_sizes.interleaved)
VERIFY(0, 1, "h5_get_file_size");
/* The lists should still have grown the same amount. The converted
@@ -2262,8 +2262,8 @@ static void test_sohm_size2(int close_reopen)
* of file space can be hard to predict.
*/
- if(btree_index.attrs1 > list_index_small.attrs1)
- VERIFY(0, 1, "h5_get_file_size");
+ if(btree_index.attrs1 > list_index_small.attrs1 * OVERHEAD_ALLOWED)
+ VERIFY(btree_index.attrs1, list_index_small.attrs1, "h5_get_file_size");
if(btree_index.attrs1 > list_index_med.attrs1 * OVERHEAD_ALLOWED)
VERIFY(0, 1, "h5_get_file_size");
if(list_index_med.attrs1 > btree_index.attrs1 * OVERHEAD_ALLOWED)
@@ -2297,8 +2297,8 @@ static void test_sohm_size2(int close_reopen)
* of sizes. The big list index is still too big to be smaller than a
* normal file. The B-tree indexes should all be about the same size.
*/
- if(btree_index.attrs2 > list_index_small.attrs2)
- VERIFY(0, 1, "h5_get_file_size");
+ if(btree_index.attrs2 > list_index_small.attrs2 * OVERHEAD_ALLOWED)
+ VERIFY(btree_index.attrs2, list_index_small.attrs2, "h5_get_file_size");
if(list_index_small.attrs2 > btree_index.attrs2 * OVERHEAD_ALLOWED)
VERIFY(0, 1, "h5_get_file_size");
if(btree_index.attrs2 > list_index_med.attrs2 * OVERHEAD_ALLOWED)
@@ -2680,14 +2680,12 @@ static void delete_helper(hid_t fcpl_id, hid_t *dspace_id, hid_t *dcpl_id)
/* The two filesizes should be almost the same */
if(norm_filesize > deleted_filesize * OVERHEAD_ALLOWED)
- VERIFY(0, 1, "h5_get_file_size");
+ VERIFY(norm_filesize, deleted_filesize, "h5_get_file_size");
if(deleted_filesize > norm_filesize * OVERHEAD_ALLOWED)
- VERIFY(0, 1, "h5_get_file_size");
-
+ VERIFY(deleted_filesize, norm_filesize, "h5_get_file_size");
}
-
/*-------------------------------------------------------------------------
* Function: test_sohm_delete
*