summaryrefslogtreecommitdiff
path: root/source4/torture/raw
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-12-08 03:47:55 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:29:01 -0500
commitc9291facd4d4f0dea226407f8e7b6436d7b3d7bd (patch)
tree05ebe691f8ec5fa421fe60c3c7f3e694dddb3fc2 /source4/torture/raw
parentc72c3e983468bdee33e4482e7b7ccb45cb7c9ddb (diff)
downloadsamba-c9291facd4d4f0dea226407f8e7b6436d7b3d7bd.tar.gz
samba-c9291facd4d4f0dea226407f8e7b6436d7b3d7bd.tar.bz2
samba-c9291facd4d4f0dea226407f8e7b6436d7b3d7bd.zip
r20078: support the large samba3 reads in RAW-READ test
(This used to be commit a4c2a575faf6a20174730524a8b2878eb9fdb50d)
Diffstat (limited to 'source4/torture/raw')
-rw-r--r--source4/torture/raw/read.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/source4/torture/raw/read.c b/source4/torture/raw/read.c
index 483f1c6677..bde360ba65 100644
--- a/source4/torture/raw/read.c
+++ b/source4/torture/raw/read.c
@@ -482,8 +482,8 @@ static BOOL test_readx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
CHECK_VALUE(io.readx.out.remaining, 0xFFFF);
CHECK_VALUE(io.readx.out.compaction_mode, 0);
if (lp_parm_bool(-1, "torture", "samba3", False)) {
- printf("SAMBA3: ignore wrong nread[%d] should be [%d]\n",
- io.readx.out.nread, 0);
+ printf("SAMBA3: large read extension\n");
+ CHECK_VALUE(io.readx.out.nread, 80000);
} else {
CHECK_VALUE(io.readx.out.nread, 0);
}
@@ -525,12 +525,22 @@ static BOOL test_readx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
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);
+ if (lp_parm_bool(-1, "torture", "samba3", False)) {
+ printf("SAMBA3: large read extension\n");
+ CHECK_VALUE(io.readx.out.nread, 0x10000);
+ } else {
+ 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);
+ if (lp_parm_bool(-1, "torture", "samba3", False)) {
+ printf("SAMBA3: large read extension\n");
+ CHECK_VALUE(io.readx.out.nread, 0x10001);
+ } else {
+ CHECK_VALUE(io.readx.out.nread, 0);
+ }
}
printf("Trying locked region\n");