summaryrefslogtreecommitdiff
path: root/lib/tdb2/test/api-93-repack.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2011-09-14 08:13:26 +0930
committerRusty Russell <rusty@rustcorp.com.au>2011-09-14 08:13:26 +0930
commitc3f3cad9eb58b84a944e501aaede818d4225d057 (patch)
treeba8ce86011954e3dbdea9ec299a338e6540319d8 /lib/tdb2/test/api-93-repack.c
parent5e2ad32f810233499913a78ebec99581e0981d8e (diff)
downloadsamba-c3f3cad9eb58b84a944e501aaede818d4225d057.tar.gz
samba-c3f3cad9eb58b84a944e501aaede818d4225d057.tar.bz2
samba-c3f3cad9eb58b84a944e501aaede818d4225d057.zip
tdb2: speed up testing.
The time to run tests under valgrind has become excessive; particularly the failure tests which fork(). Thus we cut down testing: 1) api-94-repack: reduce from 234 seconds to 2 seconds by cutting iterations, despite adding TDB_VERSION1 tests. 2) api-missing-entries: reduce from 17 seconds to under 1 second by not checking db inside loop, but at end. This reduces the total ccanlint time from 729 to 489 seconds. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit a99c2ccf97465d47c3277d997ea93f20ff97ad4d)
Diffstat (limited to 'lib/tdb2/test/api-93-repack.c')
-rw-r--r--lib/tdb2/test/api-93-repack.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/tdb2/test/api-93-repack.c b/lib/tdb2/test/api-93-repack.c
index 0a2e6d5b82..74a8b5eda2 100644
--- a/lib/tdb2/test/api-93-repack.c
+++ b/lib/tdb2/test/api-93-repack.c
@@ -5,7 +5,7 @@
#include <fcntl.h>
#include "logging.h"
-#define NUM_TESTS 50000
+#define NUM_TESTS 1000
static bool store_all(struct tdb_context *tdb)
{
@@ -53,6 +53,9 @@ int main(int argc, char *argv[])
struct tdb_context *tdb;
int flags[] = { TDB_DEFAULT, TDB_NOMMAP,
TDB_CONVERT, TDB_NOMMAP|TDB_CONVERT,
+ TDB_VERSION1, TDB_VERSION1|TDB_NOMMAP,
+ TDB_VERSION1|TDB_CONVERT,
+ TDB_VERSION1|TDB_NOMMAP|TDB_CONVERT
};
plan_tests(sizeof(flags) / sizeof(flags[0]) * 6 + 1);