summaryrefslogtreecommitdiff
path: root/source4/torture/raw/read.c
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/raw/read.c
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/raw/read.c')
-rw-r--r--source4/torture/raw/read.c17
1 files changed, 17 insertions, 0 deletions
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);