diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-07-14 04:27:55 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:23:04 -0500 |
commit | 606beece8ed995f457b012a8010aa0e8ed1f5b07 (patch) | |
tree | ab748e65733e217ad29383edc24a2126260f3c1c /source4/lib/tdb | |
parent | a411d4f4d5801a2ceae7eb7c88f5b6f7bc3bdcc3 (diff) | |
download | samba-606beece8ed995f457b012a8010aa0e8ed1f5b07.tar.gz samba-606beece8ed995f457b012a8010aa0e8ed1f5b07.tar.bz2 samba-606beece8ed995f457b012a8010aa0e8ed1f5b07.zip |
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)
Diffstat (limited to 'source4/lib/tdb')
-rw-r--r-- | source4/lib/tdb/Makefile.in | 5 | ||||
-rw-r--r-- | source4/lib/tdb/tools/tdbtorture.c | 6 |
2 files changed, 9 insertions, 2 deletions
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<NPROC-1;i++) { if ((pids[i+1]=fork()) == 0) break; } |