svn commit: samba r7178 - in
branches/SAMBA_4_0/source/torture/nbench: .
jra at samba.org
jra at samba.org
Wed Jun 1 23:10:12 GMT 2005
Author: jra
Date: 2005-06-01 23:10:11 +0000 (Wed, 01 Jun 2005)
New Revision: 7178
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7178
Log:
If we're using one process in NETBENCH simultion only open one
connection to the server. Makes valgrind/cachegrind on the server
easier.
Jeremy.
Modified:
branches/SAMBA_4_0/source/torture/nbench/nbench.c
Changeset:
Modified: branches/SAMBA_4_0/source/torture/nbench/nbench.c
===================================================================
--- branches/SAMBA_4_0/source/torture/nbench/nbench.c 2005-06-01 23:02:16 UTC (rev 7177)
+++ branches/SAMBA_4_0/source/torture/nbench/nbench.c 2005-06-01 23:10:11 UTC (rev 7178)
@@ -32,6 +32,7 @@
/* run a test that simulates an approximate netbench client load */
static BOOL run_netbench(struct smbcli_state *cli, int client)
{
+ extern int torture_nprocs;
int i;
pstring line;
char *cname;
@@ -40,6 +41,12 @@
const char *p;
BOOL correct = True;
+ if (torture_nprocs == 1) {
+ if (!torture_setup_dir(cli, "\\clients")) {
+ return False;
+ }
+ }
+
nb_setup(cli, client);
asprintf(&cname, "client%d", client+1);
@@ -173,12 +180,14 @@
loadfile = "client.txt";
}
- if (!torture_open_connection(&cli)) {
- return False;
- }
+ if (torture_nprocs > 1) {
+ if (!torture_open_connection(&cli)) {
+ return False;
+ }
- if (!torture_setup_dir(cli, "\\clients")) {
- return False;
+ if (!torture_setup_dir(cli, "\\clients")) {
+ return False;
+ }
}
nbio_shmem(torture_nprocs, timelimit, warmup);
More information about the samba-cvs
mailing list