s4:torture: raw.read fix large reads against windows
authorStefan Metzmacher <metze@samba.org>
Tue, 19 Mar 2013 16:11:03 +0000 (17:11 +0100)
committerJeremy Allison <jra@samba.org>
Wed, 20 Mar 2013 17:07:42 +0000 (10:07 -0700)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/torture/raw/read.c

index 6586177e3eed1734911a6f2b211b9b8d40828707..5a5ffeeb4a1db35ff02b5c90632355a9c77886b3 100644 (file)
@@ -529,7 +529,7 @@ static bool test_readx(struct torture_context *tctx, struct smbcli_state *cli)
                printf("SAMBA: large read extension\n");
                CHECK_VALUE(io.readx.out.nread, 80000);
        } else {
-               CHECK_VALUE(io.readx.out.nread, 0);
+               CHECK_VALUE(io.readx.out.nread, 0x10000);
        }
        CHECK_BUFFER(buf, seed, io.readx.out.nread);
 
@@ -569,13 +569,7 @@ static bool test_readx(struct torture_context *tctx, struct smbcli_state *cli)
                io.readx.in.maxcnt = 0x10000;
                status = smb_raw_read(cli->tree, &io);
                CHECK_STATUS(status, NT_STATUS_OK);
-               if (torture_setting_bool(tctx, "samba3", false) || 
-                   torture_setting_bool(tctx, "samba4", false)) {
-                       printf("SAMBA: large read extension\n");
-                       CHECK_VALUE(io.readx.out.nread, 0x10000);
-               } else {
-                       CHECK_VALUE(io.readx.out.nread, 0);
-               }
+               CHECK_VALUE(io.readx.out.nread, 0x10000);
 
                io.readx.in.maxcnt = 0x10001;
                status = smb_raw_read(cli->tree, &io);
@@ -585,7 +579,7 @@ static bool test_readx(struct torture_context *tctx, struct smbcli_state *cli)
                        printf("SAMBA: large read extension\n");
                        CHECK_VALUE(io.readx.out.nread, 0x10001);
                } else {
-                       CHECK_VALUE(io.readx.out.nread, 0);
+                       CHECK_VALUE(io.readx.out.nread, 0x10000);
                }
        } else {
                printf("Server does not support the CAP_LARGE_READX extension\n");