svn commit: samba r14039 - in branches/SAMBA_4_0/source/torture: .

metze at samba.org metze at samba.org
Wed Mar 8 14:58:58 GMT 2006


Author: metze
Date: 2006-03-08 14:58:57 +0000 (Wed, 08 Mar 2006)
New Revision: 14039

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14039

Log:
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
Modified:
   branches/SAMBA_4_0/source/torture/torture.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/torture.c
===================================================================
--- branches/SAMBA_4_0/source/torture/torture.c	2006-03-08 12:31:57 UTC (rev 14038)
+++ branches/SAMBA_4_0/source/torture/torture.c	2006-03-08 14:58:57 UTC (rev 14039)
@@ -918,18 +918,19 @@
 		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 @@
 		correct = False;
 	}
 
+	torture_close_connection(cli);
+
 	printf("finished negprot nowait test\n");
 
 	return correct;



More information about the samba-cvs mailing list