summaryrefslogtreecommitdiff
path: root/source4/torture/raw/write.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-10-29 05:01:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:24:41 -0500
commit535d1920f887ef98d962bcd7a40eae556f8e727f (patch)
tree1b711a181c5e04a354ec849927ea737966d39eb0 /source4/torture/raw/write.c
parent6fbbef77e62336a0fd6c2e0ca5259a75629cd55f (diff)
downloadsamba-535d1920f887ef98d962bcd7a40eae556f8e727f.tar.gz
samba-535d1920f887ef98d962bcd7a40eae556f8e727f.tar.bz2
samba-535d1920f887ef98d962bcd7a40eae556f8e727f.zip
r19506: fixed remaining parts of RAW-READ and RAW-WRITE tests to check for
CAP_LARGE_FILES (This used to be commit 66bebb210550793d0e7fe1b6a03a5140455ae72f)
Diffstat (limited to 'source4/torture/raw/write.c')
-rw-r--r--source4/torture/raw/write.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/source4/torture/raw/write.c b/source4/torture/raw/write.c
index 046ca8c4f9..17606d771e 100644
--- a/source4/torture/raw/write.c
+++ b/source4/torture/raw/write.c
@@ -188,6 +188,11 @@ static BOOL test_write(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
goto done;
}
+ if (!(cli->transport->negotiate.capabilities & CAP_LARGE_FILES)) {
+ printf("skipping large file tests - CAP_LARGE_FILES not set\n");
+ goto done;
+ }
+
printf("Trying 2^32 offset\n");
setup_buffer(buf, seed, maxsize);
io.write.in.file.fnum = fnum;
@@ -198,7 +203,7 @@ static BOOL test_write(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VALUE(io.write.out.nwritten, 4000);
CHECK_ALL_INFO(io.write.in.count + (uint64_t)io.write.in.offset, size);
-
+
memset(buf, 0, maxsize);
if (smbcli_read(cli->tree, fnum, buf, io.write.in.offset, 4000) != 4000) {
printf("read failed at %s\n", __location__);
@@ -342,6 +347,11 @@ static BOOL test_writex(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
status = torture_set_sparse(cli->tree, fnum);
CHECK_STATUS(status, NT_STATUS_OK);
+ if (!(cli->transport->negotiate.capabilities & CAP_LARGE_FILES)) {
+ printf("skipping large file tests - CAP_LARGE_FILES not set\n");
+ goto done;
+ }
+
printf("Trying 2^32 offset\n");
setup_buffer(buf, seed, maxsize);
io.writex.in.file.fnum = fnum;
@@ -505,6 +515,11 @@ static BOOL test_writeunlock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
status = torture_set_sparse(cli->tree, fnum);
CHECK_STATUS(status, NT_STATUS_OK);
+ if (!(cli->transport->negotiate.capabilities & CAP_LARGE_FILES)) {
+ printf("skipping large file tests - CAP_LARGE_FILES not set\n");
+ goto done;
+ }
+
printf("Trying 2^32 offset\n");
setup_buffer(buf, seed, maxsize);
io.writeunlock.in.file.fnum = fnum;
@@ -655,6 +670,11 @@ static BOOL test_writeclose(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
status = torture_set_sparse(cli->tree, fnum);
CHECK_STATUS(status, NT_STATUS_OK);
+ if (!(cli->transport->negotiate.capabilities & CAP_LARGE_FILES)) {
+ printf("skipping large file tests - CAP_LARGE_FILES not set\n");
+ goto done;
+ }
+
printf("Trying 2^32 offset\n");
setup_buffer(buf, seed, maxsize);
io.writeclose.in.file.fnum = fnum;