1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

r7178: If we're using one process in NETBENCH simultion only open one

connection to the server. Makes valgrind/cachegrind on the server
easier.
Jeremy.
This commit is contained in:
Jeremy Allison 2005-06-01 23:10:11 +00:00 committed by Gerald (Jerry) Carter
parent aab9b953da
commit fba9462591

View File

@ -32,6 +32,7 @@ static const char *loadfile;
/* 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 @@ static BOOL run_netbench(struct smbcli_state *cli, int client)
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 @@ BOOL torture_nbench(void)
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);