svn commit: samba r19510 - in branches/SAMBA_4_0/source/torture: .
basic nbench raw
jelmer at samba.org
jelmer at samba.org
Mon Oct 30 00:17:17 GMT 2006
Author: jelmer
Date: 2006-10-30 00:17:16 +0000 (Mon, 30 Oct 2006)
New Revision: 19510
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19510
Log:
Make smbtorture's `nprocs' parameter a parametric option.
Modified:
branches/SAMBA_4_0/source/torture/basic/misc.c
branches/SAMBA_4_0/source/torture/nbench/nbench.c
branches/SAMBA_4_0/source/torture/raw/oplock.c
branches/SAMBA_4_0/source/torture/smbtorture.c
branches/SAMBA_4_0/source/torture/torture.c
branches/SAMBA_4_0/source/torture/torture.h
branches/SAMBA_4_0/source/torture/util_smb.c
Changeset:
Modified: branches/SAMBA_4_0/source/torture/basic/misc.c
===================================================================
--- branches/SAMBA_4_0/source/torture/basic/misc.c 2006-10-29 23:50:32 UTC (rev 19509)
+++ branches/SAMBA_4_0/source/torture/basic/misc.c 2006-10-30 00:17:16 UTC (rev 19510)
@@ -596,7 +596,8 @@
NT_STATUS_NOT_OK_RETURN(req->status);
/* open/create the files */
- torture_comment(tctx, "Open File %d/%d\n",state->nr+1,torture_nprocs);
+ torture_comment(tctx, "Open File %d/%d\n",state->nr+1,
+ lp_parm_int(-1, "torture", "nprocs", 4));
open_parms=talloc_zero(state->mem_ctx, union smb_open);
NT_STATUS_HAVE_NO_MEMORY(open_parms);
open_parms->openx.level = RAW_OPEN_OPENX;
@@ -760,9 +761,10 @@
union smb_mkdir parms;
int finished = 0;
BOOL success=True;
+ int torture_nprocs = lp_parm_int(-1, "torture", "nprocs", 4);
torture_comment(tctx, "Start BENCH-READWRITE num_ops=%d num_nprocs=%d\n",
- torture_numops,torture_nprocs);
+ torture_numops, torture_nprocs);
/*init talloc context*/
ev = event_context_init(tctx);
Modified: branches/SAMBA_4_0/source/torture/nbench/nbench.c
===================================================================
--- branches/SAMBA_4_0/source/torture/nbench/nbench.c 2006-10-29 23:50:32 UTC (rev 19509)
+++ branches/SAMBA_4_0/source/torture/nbench/nbench.c 2006-10-30 00:17:16 UTC (rev 19510)
@@ -38,7 +38,7 @@
/* run a test that simulates an approximate netbench client load */
static BOOL run_netbench(struct torture_context *tctx, struct smbcli_state *cli, int client)
{
- extern int torture_nprocs;
+ int torture_nprocs = lp_parm_int(-1, "torture", "nprocs", 4);
int i;
pstring line;
char *cname;
@@ -171,7 +171,7 @@
BOOL torture_nbench(struct torture_context *torture)
{
BOOL correct = True;
- extern int torture_nprocs;
+ int torture_nprocs = lp_parm_int(-1, "torture", "nprocs", 4);
struct smbcli_state *cli;
const char *p;
Modified: branches/SAMBA_4_0/source/torture/raw/oplock.c
===================================================================
--- branches/SAMBA_4_0/source/torture/raw/oplock.c 2006-10-29 23:50:32 UTC (rev 19509)
+++ branches/SAMBA_4_0/source/torture/raw/oplock.c 2006-10-30 00:17:16 UTC (rev 19510)
@@ -767,7 +767,7 @@
struct smbcli_state **cli;
BOOL ret = True;
TALLOC_CTX *mem_ctx = talloc_new(torture);
- extern int torture_nprocs;
+ int torture_nprocs = lp_parm_int(-1, "torture", "nprocs", 4);
int i, count=0;
int timelimit = torture_setting_int(torture, "timelimit", 10);
union smb_open io;
Modified: branches/SAMBA_4_0/source/torture/smbtorture.c
===================================================================
--- branches/SAMBA_4_0/source/torture/smbtorture.c 2006-10-29 23:50:32 UTC (rev 19509)
+++ branches/SAMBA_4_0/source/torture/smbtorture.c 2006-10-30 00:17:16 UTC (rev 19510)
@@ -448,7 +448,6 @@
{"format", 0, POPT_ARG_STRING, &ui_ops_name, 0, "Output format (one of: simple, subunit, harness)", NULL },
{"smb-ports", 'p', POPT_ARG_STRING, NULL, OPT_SMB_PORTS, "SMB ports", NULL},
{"seed", 0, POPT_ARG_INT, &torture_seed, 0, "seed", NULL},
- {"num-progs", 0, POPT_ARG_INT, &torture_nprocs, 0, "num progs", NULL},
{"num-ops", 0, POPT_ARG_INT, &torture_numops, 0, "num ops", NULL},
{"entries", 0, POPT_ARG_INT, &torture_entries, 0, "entries", NULL},
{"show-all", 0, POPT_ARG_NONE, &torture_showall, 0, "show all", NULL},
Modified: branches/SAMBA_4_0/source/torture/torture.c
===================================================================
--- branches/SAMBA_4_0/source/torture/torture.c 2006-10-29 23:50:32 UTC (rev 19509)
+++ branches/SAMBA_4_0/source/torture/torture.c 2006-10-30 00:17:16 UTC (rev 19510)
@@ -25,7 +25,6 @@
#include "build.h"
#include "lib/util/dlinklist.h"
-_PUBLIC_ int torture_nprocs=4;
_PUBLIC_ int torture_numops=10;
_PUBLIC_ int torture_entries=1000;
_PUBLIC_ int torture_failures=1;
Modified: branches/SAMBA_4_0/source/torture/torture.h
===================================================================
--- branches/SAMBA_4_0/source/torture/torture.h 2006-10-29 23:50:32 UTC (rev 19509)
+++ branches/SAMBA_4_0/source/torture/torture.h 2006-10-30 00:17:16 UTC (rev 19510)
@@ -31,7 +31,6 @@
extern BOOL use_oplocks;
extern BOOL torture_showall;
extern int torture_entries;
-extern int torture_nprocs;
extern int torture_seed;
extern int torture_numops;
extern int torture_failures;
Modified: branches/SAMBA_4_0/source/torture/util_smb.c
===================================================================
--- branches/SAMBA_4_0/source/torture/util_smb.c 2006-10-29 23:50:32 UTC (rev 19509)
+++ branches/SAMBA_4_0/source/torture/util_smb.c 2006-10-30 00:17:16 UTC (rev 19510)
@@ -608,6 +608,7 @@
volatile bool *child_status_out;
int synccount;
int tries = 8;
+ int torture_nprocs = lp_parm_int(-1, "torture", "nprocs", 4);
double start_time_limit = 10 + (torture_nprocs * 1.5);
struct timeval tv;
More information about the samba-cvs
mailing list