summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-05-26 12:19:09 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-05-26 12:19:09 +0200
commit40a90e6a5581f74b2e8caf67d934a08e8a9befc9 (patch)
treea34823fd0dec12eb87976e20e4dbdb3f3e4e1069 /source4/torture
parent58b1ab92a117cfcb311bdcb41fe563077ad39500 (diff)
parent98e72f574a9ce2a676bcb010e4e6ee2df39af4b6 (diff)
downloadsamba-40a90e6a5581f74b2e8caf67d934a08e8a9befc9.tar.gz
samba-40a90e6a5581f74b2e8caf67d934a08e8a9befc9.tar.bz2
samba-40a90e6a5581f74b2e8caf67d934a08e8a9befc9.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-pyirpc
(This used to be commit e1af9708c9b40edfa21862028672882797218174)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/gentest_smb2.c2
-rw-r--r--source4/torture/raw/read.c17
2 files changed, 18 insertions, 1 deletions
diff --git a/source4/torture/gentest_smb2.c b/source4/torture/gentest_smb2.c
index 6546ba6768..46545699d0 100644
--- a/source4/torture/gentest_smb2.c
+++ b/source4/torture/gentest_smb2.c
@@ -1026,7 +1026,7 @@ static bool handler_create(int instance)
/* mask out oplocks */
parm[0].in.oplock_level = 0;
}
-
+
GEN_COPY_PARM;
GEN_CALL(smb2_create(tree, current_op.mem_ctx, &parm[i]));
diff --git a/source4/torture/raw/read.c b/source4/torture/raw/read.c
index c8420c279e..ada9b1f432 100644
--- a/source4/torture/raw/read.c
+++ b/source4/torture/raw/read.c
@@ -460,6 +460,23 @@ static bool test_readx(struct torture_context *tctx, struct smbcli_state *cli)
CHECK_VALUE(io.readx.out.compaction_mode, 0);
}
+ printf("Trying mincnt past EOF\n");
+ memset(buf, 0, maxsize);
+ io.readx.in.offset = 0;
+ io.readx.in.mincnt = 100;
+ io.readx.in.maxcnt = 110;
+ status = smb_raw_read(cli->tree, &io);
+ CHECK_STATUS(status, NT_STATUS_OK);
+ CHECK_VALUE(io.readx.out.remaining, 0xFFFF);
+ CHECK_VALUE(io.readx.out.compaction_mode, 0);
+ CHECK_VALUE(io.readx.out.nread, strlen(test_data));
+ if (memcmp(buf, test_data, strlen(test_data)) != 0) {
+ ret = false;
+ printf("incorrect data at %d!? (%s:%s)\n", __LINE__, test_data, buf);
+ goto done;
+ }
+
+
setup_buffer(buf, seed, maxsize);
smbcli_write(cli->tree, fnum, 0, buf, 0, maxsize);
memset(buf, 0, maxsize);