From: Volker Lendecke Date: Wed, 4 Apr 2012 12:29:33 +0000 (+0200) Subject: s3: Make torture_nprocs globally available X-Git-Tag: ldb-1.1.6~37 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=842b86c45ff656aab531530646a4e935e53166e4;p=thirdparty%2Fsamba.git s3: Make torture_nprocs globally available --- diff --git a/source3/torture/torture.c b/source3/torture/torture.c index ae0d6d4c080..0a951eb37a0 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -47,7 +47,7 @@ extern int optind; fstring host, workgroup, share, password, username, myname; static int max_protocol = PROTOCOL_NT1; static const char *sockops="TCP_NODELAY"; -static int nprocs=1; +int torture_nprocs=1; static int port_to_use=0; int torture_numops=100; int torture_blocksize=1024*1024; @@ -1211,7 +1211,7 @@ static bool run_nbench(int dummy) double t; bool correct = True; - nbio_shmem(nprocs); + nbio_shmem(torture_nprocs); nbio_id = -1; @@ -8434,7 +8434,7 @@ static bool run_local_wbclient(int dummy) goto fail; } - wb_ctx = talloc_array(ev, struct wb_context *, nprocs); + wb_ctx = talloc_array(ev, struct wb_context *, torture_nprocs); if (wb_ctx == NULL) { goto fail; } @@ -8442,9 +8442,9 @@ static bool run_local_wbclient(int dummy) ZERO_STRUCT(wb_req); wb_req.cmd = WINBINDD_PING; - d_printf("nprocs=%d, numops=%d\n", (int)nprocs, (int)torture_numops); + d_printf("torture_nprocs=%d, numops=%d\n", (int)torture_nprocs, (int)torture_numops); - for (i=0; i