diff options
author | Luke Leighton <lkcl@samba.org> | 1999-05-07 20:21:30 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1999-05-07 20:21:30 +0000 |
commit | 980a7b11f3dabce561a0ed02041695451bfeb391 (patch) | |
tree | 1d06f60599eb711bd3934302311ba7c473b7eb21 | |
parent | 34e623d607b45bce09ab2f98f3735cfbf5538dbf (diff) | |
download | samba-980a7b11f3dabce561a0ed02041695451bfeb391.tar.gz |
variation of random SMBtrans2. random delays in between reconnections
increased. size of large random buffer decreased. number of reconnection
attempts increased.
-rw-r--r-- | source/utils/torture.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/source/utils/torture.c b/source/utils/torture.c index 0e1b0b6fcdc..2de96810318 100644 --- a/source/utils/torture.c +++ b/source/utils/torture.c @@ -745,15 +745,17 @@ static void rand_buf(char *buf, int len) } } +#define TORT_BUFFER_SIZE 1024 + /* send random IPC commands */ static void run_randomipc(int numops) { char *rparam = NULL; char *rdata = NULL; int rdrcnt,rprcnt; - char param[BUFFER_SIZE]; + char param[TORT_BUFFER_SIZE]; int api, param_len, i; - int reconnect_count = 50; + int reconnect_count = 500; static struct cli_state cli; DEBUG(0,("starting random ipc test\n")); @@ -761,7 +763,7 @@ static void run_randomipc(int numops) while (reconnect_count > 0 && open_connection(&cli) != 0) { DEBUG(0,("connection failed: retrying %d\n", reconnect_count)); - msleep(sys_random() % 1000); + msleep(sys_random() % 5000); reconnect_count--; } @@ -775,7 +777,7 @@ static void run_randomipc(int numops) api = sys_random() % 500; if ((sys_random() % 10) == 0) { - param_len = (sys_random() % BUFFER_SIZE); + param_len = (sys_random() % TORT_BUFFER_SIZE); } else { @@ -801,9 +803,9 @@ static void run_randomipc(int numops) /* send random IPC commands */ static void run_randomipc_nowait(int numops) { - char param[BUFFER_SIZE]; + char param[TORT_BUFFER_SIZE]; int api, param_len, i; - int reconnect_count = 50; + int reconnect_count = 500; static struct cli_state cli; DEBUG(0,("start random ipc test no waiting for SMBtrans response\n")); @@ -811,7 +813,7 @@ static void run_randomipc_nowait(int numops) while (reconnect_count > 0 && open_connection(&cli) != 0) { DEBUG(0,("connection failed: retrying %d\n", reconnect_count)); - msleep(sys_random() % 1000); + msleep(sys_random() % 5000); reconnect_count--; } @@ -825,7 +827,7 @@ static void run_randomipc_nowait(int numops) api = sys_random() % 500; if ((sys_random() % 10) == 0) { - param_len = (sys_random() % BUFFER_SIZE); + param_len = (sys_random() % TORT_BUFFER_SIZE); } else { @@ -1219,11 +1221,11 @@ static void create_procs(int nprocs, int numops, void (*fn)(int )) printf("host=%s share=%s user=%s myname=%s procs=%d ops=%d\n", host, share, username, myname, nprocs, numops); - create_procs(nprocs, numops, run_connection); + create_procs(nprocs, numops, run_randomipc_nowait); /* + create_procs(nprocs, numops, run_connection); create_procs(nprocs, numops, run_randomipc); - create_procs(nprocs, numops, run_randomipc_nowait); run_fdpasstest(); run_locktest1(); |