diff options
author | Luke Leighton <lkcl@samba.org> | 2000-09-26 05:44:42 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 2000-09-26 05:44:42 +0000 |
commit | dda54bcd7d6f6d674f197abd323e102fdf7e8dc3 (patch) | |
tree | 69af1dfdf9d8d1e8a60cc0ca563c1777e7a36450 /source3/utils/torture.c | |
parent | 5be845af6bea3d4795dc50fe9ee880527be5ecc0 (diff) | |
download | samba-dda54bcd7d6f6d674f197abd323e102fdf7e8dc3.tar.gz samba-dda54bcd7d6f6d674f197abd323e102fdf7e8dc3.tar.bz2 samba-dda54bcd7d6f6d674f197abd323e102fdf7e8dc3.zip |
added NEGNOWAIT. sent to secure@microsoft.com
(This used to be commit b21179331802aace566671dcff6db22cdf4b3e81)
Diffstat (limited to 'source3/utils/torture.c')
-rw-r--r-- | source3/utils/torture.c | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/source3/utils/torture.c b/source3/utils/torture.c index 5a5754a21a..4267aab118 100644 --- a/source3/utils/torture.c +++ b/source3/utils/torture.c @@ -89,7 +89,7 @@ static void *shm_setup(int size) } -static BOOL open_connection(struct cli_state *c) +static BOOL open_nbt_connection(struct cli_state *c) { struct nmb_name called, calling; struct in_addr ip; @@ -116,6 +116,17 @@ static BOOL open_connection(struct cli_state *c) return False; } + return True; +} + +static BOOL open_connection(struct cli_state *c) +{ + ZERO_STRUCTP(c); + + if (!open_nbt_connection(c)) { + return False; + } + if (!cli_negprot(c)) { printf("%s rejected the negprot (%s)\n",host, cli_errstr(c)); cli_shutdown(c); @@ -142,7 +153,6 @@ static BOOL open_connection(struct cli_state *c) } - static void close_connection(struct cli_state *c) { if (!cli_tdis(c)) { @@ -1617,6 +1627,28 @@ static void rand_buf(char *buf, int len) } } +/* send smb negprot commands, not reading the response */ +static void run_negprot_nowait(int dummy) +{ + int i; + static struct cli_state cli; + + printf("starting negprot nowait test\n"); + + if (!open_nbt_connection(&cli)) { + return; + } + + for (i=0;i<50000;i++) { + cli_negprot_send(&cli); + } + + close_connection(&cli); + + printf("finished negprot nowait test\n"); +} + + /* send random IPC commands */ static void run_randomipc(int dummy) { @@ -2054,6 +2086,7 @@ static struct { {"MAXFID", run_maxfidtest, FLAG_MULTIPROC}, {"TORTURE",run_torture, FLAG_MULTIPROC}, {"RANDOMIPC", run_randomipc, 0}, + {"NEGNOWAIT", run_negprot_nowait, 0}, {"NBW95", run_nbw95, 0}, {"NBWNT", run_nbwnt, 0}, {"OPLOCK", run_oplock, 0}, |