summaryrefslogtreecommitdiff
path: root/source4/torture/raw/read.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-08-05 12:07:21 +1000
committerAndrew Tridgell <tridge@samba.org>2009-08-05 12:08:30 +1000
commit8bba340e65e84ee09a7da4d97bc7838d3eefbb15 (patch)
tree7245c0efb7e65c972775d60e5580f74f410eb30a /source4/torture/raw/read.c
parent15a6a93d35e5be0ed24377006060ff66802d6844 (diff)
downloadsamba-8bba340e65e84ee09a7da4d97bc7838d3eefbb15.tar.gz
samba-8bba340e65e84ee09a7da4d97bc7838d3eefbb15.tar.bz2
samba-8bba340e65e84ee09a7da4d97bc7838d3eefbb15.zip
s4 now supports the large readx extension
Diffstat (limited to 'source4/torture/raw/read.c')
-rw-r--r--source4/torture/raw/read.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/source4/torture/raw/read.c b/source4/torture/raw/read.c
index 4fd2cf50c6..f99da8fb1e 100644
--- a/source4/torture/raw/read.c
+++ b/source4/torture/raw/read.c
@@ -499,8 +499,9 @@ static bool test_readx(struct torture_context *tctx, struct smbcli_state *cli)
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VALUE(io.readx.out.remaining, 0xFFFF);
CHECK_VALUE(io.readx.out.compaction_mode, 0);
- if (torture_setting_bool(tctx, "samba3", false)) {
- printf("SAMBA3: large read extension\n");
+ 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, 80000);
} else {
CHECK_VALUE(io.readx.out.nread, 0);
@@ -543,8 +544,9 @@ 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)) {
- printf("SAMBA3: large read extension\n");
+ 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);
@@ -553,12 +555,15 @@ static bool test_readx(struct torture_context *tctx, struct smbcli_state *cli)
io.readx.in.maxcnt = 0x10001;
status = smb_raw_read(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- if (torture_setting_bool(tctx, "samba3", false)) {
- printf("SAMBA3: large read extension\n");
+ 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, 0x10001);
} else {
CHECK_VALUE(io.readx.out.nread, 0);
}
+ } else {
+ printf("Server does not support the CAP_LARGE_READX extension\n");
}
printf("Trying locked region\n");