From 959c4191824347fe207a5996afb0d9aca7c905cb Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 8 Mar 2006 14:58:57 +0000 Subject: r14039: as samba4 drops the connection on multiple negprot requests make the BASE-NEGNOWAIT tests more robust. was it correct that the important thing to test in this test is that the 2nd connection works fine? metze (This used to be commit f941e748640fa88eb5868420059efd0c38d7d745) --- source4/torture/torture.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'source4/torture/torture.c') diff --git a/source4/torture/torture.c b/source4/torture/torture.c index 2ce51407be..5a86a22133 100644 --- a/source4/torture/torture.c +++ b/source4/torture/torture.c @@ -918,18 +918,19 @@ static BOOL run_negprot_nowait(void) req = smb_raw_negotiate_send(cli->transport, PROTOCOL_NT1); event_loop_once(cli->transport->socket->event.ctx); if (req->state == SMBCLI_REQUEST_ERROR) { - printf("Failed to fill pipe - %s\n", nt_errstr(req->status)); - torture_close_connection(cli); - return correct; + if (i > 0) { + printf("Failed to fill pipe packet[%d] - %s (ignored)\n", i+1, nt_errstr(req->status)); + break; + } else { + printf("Failed to fill pipe - %s \n", nt_errstr(req->status)); + torture_close_connection(cli); + return False; + } } } printf("Opening secondary connection\n"); if (!torture_open_connection(&cli2)) { - return False; - } - - if (!torture_close_connection(cli)) { correct = False; } @@ -937,6 +938,8 @@ static BOOL run_negprot_nowait(void) correct = False; } + torture_close_connection(cli); + printf("finished negprot nowait test\n"); return correct; -- cgit