From 205242e1769f96e0e8fccd52378965d35dd02093 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 14 Feb 2012 14:45:21 +1030 Subject: tdb/test: fix up tests for use in SAMBA tdb code. 1) Make sure we include "tdb_private.h" first, to get the right headers (esp. the correct setting of _FILE_OFFSET_BITS before unistd.h). 2) Fix 3G file test since expand logic has changed. 3) Fix nested transaction test, since default is to allow nesting. 4) Capture fdatasync, which was slowing down transaction expand. Signed-off-by: Rusty Russell --- lib/tdb/test/run-3G-file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/tdb/test/run-3G-file.c') diff --git a/lib/tdb/test/run-3G-file.c b/lib/tdb/test/run-3G-file.c index ba85d1473e..5ea4fcfbde 100644 --- a/lib/tdb/test/run-3G-file.c +++ b/lib/tdb/test/run-3G-file.c @@ -81,8 +81,8 @@ int main(int argc, char *argv[]) ok1(tdb); tdb->methods = &large_io_methods; - /* Enlarge the file (internally multiplies by 100). */ - ok1(tdb_expand(tdb, 30000000) == 0); + /* Enlarge the file (internally multiplies by 2). */ + ok1(tdb_expand(tdb, 1500000000) == 0); /* Put an entry in, and check it. */ key.dsize = strlen("hi"); -- cgit