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

tridge at samba.org tridge at samba.org
Thu Dec 7 04:02:20 GMT 2006


Author: tridge
Date: 2006-12-07 04:02:20 +0000 (Thu, 07 Dec 2006)
New Revision: 20059

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

Log:

james was asking about CAP_LARGE_READX and reads close to the 64k
boundary. This test shows that both for Samba4 and w2k3, reads larger
than or equal to 64k don't work (return zero bytes).

Not that I claim this is very useful behaviour :-)

Modified:
   branches/SAMBA_4_0/source/torture/raw/read.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/raw/read.c
===================================================================
--- branches/SAMBA_4_0/source/torture/raw/read.c	2006-12-07 00:08:10 UTC (rev 20058)
+++ branches/SAMBA_4_0/source/torture/raw/read.c	2006-12-07 04:02:20 UTC (rev 20059)
@@ -513,6 +513,26 @@
 	CHECK_VALUE(io.readx.out.nread, io.readx.in.maxcnt);
 	CHECK_BUFFER(buf, seed, io.readx.out.nread);
 
+	if (cli->transport->negotiate.capabilities & CAP_LARGE_READX) {
+		printf("Trying large readx\n");
+		io.readx.in.offset = 0;
+		io.readx.in.mincnt = 0;
+		io.readx.in.maxcnt = 0x10000 - 1;
+		status = smb_raw_read(cli->tree, &io);
+		CHECK_STATUS(status, NT_STATUS_OK);
+		CHECK_VALUE(io.readx.out.nread, 0xFFFF);
+
+		io.readx.in.maxcnt = 0x10000;
+		status = smb_raw_read(cli->tree, &io);
+		CHECK_STATUS(status, NT_STATUS_OK);
+		CHECK_VALUE(io.readx.out.nread, 0);
+
+		io.readx.in.maxcnt = 0x10001;
+		status = smb_raw_read(cli->tree, &io);
+		CHECK_STATUS(status, NT_STATUS_OK);
+		CHECK_VALUE(io.readx.out.nread, 0);
+	}
+
 	printf("Trying locked region\n");
 	cli->session->pid++;
 	if (NT_STATUS_IS_ERR(smbcli_lock(cli->tree, fnum, 103, 1, 0, WRITE_LOCK))) {



More information about the samba-cvs mailing list