From 606beece8ed995f457b012a8010aa0e8ed1f5b07 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 14 Jul 2005 04:27:55 +0000 Subject: r8448: - added a test target for tdb - reduced the torture size so it doesn't kill the build farm hosts (This used to be commit 7a88a9f06cbe5c125edad0da7908b94bcedfe4fc) --- source4/lib/tdb/Makefile.in | 5 +++++ source4/lib/tdb/tools/tdbtorture.c | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'source4') diff --git a/source4/lib/tdb/Makefile.in b/source4/lib/tdb/Makefile.in index 8e9a359514..ea96dddffc 100644 --- a/source4/lib/tdb/Makefile.in +++ b/source4/lib/tdb/Makefile.in @@ -40,3 +40,8 @@ bin/tdbbackup: tools/tdbbackup.o $(TDB_OBJ) clean: rm -f $(PROGS) common/*.o tools/*.o *~ *.bak */*~ */*.bak *% core test.db test.tdb test.gdbm + +installcheck: install + $(bindir)/tdbtorture + +test: installcheck diff --git a/source4/lib/tdb/tools/tdbtorture.c b/source4/lib/tdb/tools/tdbtorture.c index 7e8e77952c..687d304b70 100644 --- a/source4/lib/tdb/tools/tdbtorture.c +++ b/source4/lib/tdb/tools/tdbtorture.c @@ -182,11 +182,11 @@ static int traverse_fn(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf, } #ifndef NPROC -#define NPROC 6 +#define NPROC 2 #endif #ifndef NLOOPS -#define NLOOPS 200000 +#define NLOOPS 5000 #endif int main(int argc, const char *argv[]) @@ -197,6 +197,8 @@ static int traverse_fn(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf, pids[0] = getpid(); + unlink("torture.tdb"); + for (i=0;i