summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-05-19 23:07:36 +0200
committerVolker Lendecke <vl@samba.org>2009-05-19 23:09:26 +0200
commitae386415b6fd15081f3b94faec917dafdeee1f93 (patch)
treec5dfd7e0981bb9212068d21c2bc75fcee4264777
parent15424162ca2f8e6627f179bc704cf4fb4372e399 (diff)
downloadsamba-ae386415b6fd15081f3b94faec917dafdeee1f93.tar.gz
samba-ae386415b6fd15081f3b94faec917dafdeee1f93.tar.bz2
samba-ae386415b6fd15081f3b94faec917dafdeee1f93.zip
Make local-wbclient flexible in # of connections and ops
-rw-r--r--source3/torture/torture.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index fa1a22228a..2c68ee609a 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -5809,7 +5809,7 @@ static bool run_local_wbclient(int dummy)
goto fail;
}
- wb_ctx = TALLOC_ARRAY(ev, struct wb_context *, torture_numops);
+ wb_ctx = TALLOC_ARRAY(ev, struct wb_context *, nprocs);
if (wb_ctx == NULL) {
goto fail;
}
@@ -5817,12 +5817,14 @@ static bool run_local_wbclient(int dummy)
ZERO_STRUCT(wb_req);
wb_req.cmd = WINBINDD_PING;
- for (i=0; i<torture_numops; i++) {
+ d_printf("nprocs=%d, numops=%d\n", (int)nprocs, (int)torture_numops);
+
+ for (i=0; i<nprocs; i++) {
wb_ctx[i] = wb_context_init(ev);
if (wb_ctx[i] == NULL) {
goto fail;
}
- for (j=0; j<5; j++) {
+ for (j=0; j<torture_numops; j++) {
struct tevent_req *req;
req = wb_trans_send(ev, ev, wb_ctx[i],
(j % 2) == 0, &wb_req);
@@ -5835,7 +5837,7 @@ static bool run_local_wbclient(int dummy)
i = 0;
- while (i < 5 * torture_numops) {
+ while (i < nprocs * torture_numops) {
event_loop_once(ev);
}