summaryrefslogtreecommitdiff
path: root/source3/tdb/tools
diff options
context:
space:
mode:
Diffstat (limited to 'source3/tdb/tools')
-rw-r--r--source3/tdb/tools/tdbtest.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/tdb/tools/tdbtest.c b/source3/tdb/tools/tdbtest.c
index c7a09789fe..1564a42bc4 100644
--- a/source3/tdb/tools/tdbtest.c
+++ b/source3/tdb/tools/tdbtest.c
@@ -219,6 +219,7 @@ static void merge_test(void)
{
int i, seed=0;
int loops = 10000;
+ int num_entries;
char test_gdbm[] = "test.gdbm";
unlink("test.gdbm");
@@ -232,8 +233,6 @@ static void merge_test(void)
fatal("db open failed");
}
- tdb_logging_function(db, tdb_log);
-
#if 1
srand(seed);
_start_timer();
@@ -248,6 +247,12 @@ static void merge_test(void)
for (i=0;i<loops;i++) addrec_db();
printf("tdb got %.2f ops/sec\n", i/_end_timer());
+ if (tdb_validate_freelist(db, &num_entries) == -1) {
+ printf("tdb freelist is corrupt\n");
+ } else {
+ printf("tdb freelist is good (%d entries)\n", num_entries);
+ }
+
compare_db();
printf("traversed %d records\n", tdb_traverse(db, traverse_fn, NULL));