Commit bc05d46e authored by Yoni Fogel's avatar Yoni Fogel

Refs Tokutek/ft-index#46 improve test coverage, minor formatting

parent 402c4c60
......@@ -1719,7 +1719,7 @@ toku_ft_bn_apply_cmd_once (
if (le) {
oldsize = leafentry_memsize(le) + key_storage_size;
}
// toku_le_apply_msg() may call bn_data::mempool_malloc_and_update_dmt() to allocate more space.
// That means le is guaranteed to not cause a sigsegv but it may point to a mempool that is
// no longer in use. We'll have to release the old mempool later.
......
......@@ -284,7 +284,7 @@ serialize_node_header(FTNODE node, FTNODE_DISK_DATA ndd, struct wbuf *wbuf) {
invariant(wbuf->ndone == wbuf->size);
}
static uint32_t
static uint32_t
serialize_ftnode_partition_size (FTNODE node, int i)
{
uint32_t result = 0;
......@@ -594,8 +594,6 @@ rebalance_ftnode_leaf(FTNODE node, unsigned int basementnodesize)
curr_pivot++;
num_le_in_curr_bn = 0;
bn_size_so_far = 0;
bn_le_sizes[curr_pivot] = 0;
bn_key_sizes[curr_pivot] = 0;
}
num_le_in_curr_bn++;
num_les_this_bn[curr_pivot] = num_le_in_curr_bn;
......
......@@ -252,7 +252,7 @@ size_t
memarena_total_size_in_use (MEMARENA m)
{
return m->size_of_other_bufs + m->buf_used;
}
}
size_t
memarena_total_footprint (MEMARENA m)
......
......@@ -349,6 +349,10 @@ int
test_main(int argc, const char *argv[]) {
parse_args(argc, argv);
// Do test with size divisible by 4 and not
test_builder_fixed(4, 0);
test_builder_fixed(5, 0);
test_builder_fixed(4, 1);
test_builder_fixed(5, 1);
test_builder_fixed(4, 100);
test_builder_fixed(5, 100);
// Do test with zero, one, or both sizes divisible
......@@ -357,20 +361,13 @@ test_main(int argc, const char *argv[]) {
test_builder_variable(5, 8, 100);
test_builder_variable(5, 10, 100);
test_create_from_sorted_memory_of_fixed_sized_elements__and__serialize(4, 0);
test_create_from_sorted_memory_of_fixed_sized_elements__and__serialize(5, 0);
test_create_from_sorted_memory_of_fixed_sized_elements__and__serialize(4, 1);
test_create_from_sorted_memory_of_fixed_sized_elements__and__serialize(5, 1);
test_create_from_sorted_memory_of_fixed_sized_elements__and__serialize(4, 100);
test_create_from_sorted_memory_of_fixed_sized_elements__and__serialize(5, 100);
/*TODO
* insert
* insert_at
* delete_at
* iterate
* iterate_on_range
* verify
* iterate_ptr
* find_zero
* find
*/
return 0;
}
......@@ -184,6 +184,7 @@ size_t toku_mempool_get_size(const struct mempool *mp) {
}
// TODO(yoni): unify the toku_mempool_get*_size and toku_mempool_get*_space functions (use either size or space but not both)
// use _size for all
size_t toku_mempool_get_frag_size(const struct mempool *mp) {
return mp->frag_size;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment