summaryrefslogtreecommitdiff
path: root/source4/torture/raw
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-10-28 06:06:15 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:24:40 -0500
commit9cd2b012f3bf9f21f321d44c43eb5a8a781d68fc (patch)
tree6bfe7a5af735a980f8a8d120d60f3326ac8e7d5a /source4/torture/raw
parent863bd921f26f95523674de325e520ae2523df3a9 (diff)
downloadsamba-9cd2b012f3bf9f21f321d44c43eb5a8a781d68fc.tar.gz
samba-9cd2b012f3bf9f21f321d44c43eb5a8a781d68fc.tar.bz2
samba-9cd2b012f3bf9f21f321d44c43eb5a8a781d68fc.zip
r19504: - fixed a free error in file_lines_parse
- added a function to test for large file support - enable CAP_LARGE_FILES only if the test passes - don't test at large offsets if the server doesn't set CAP_LARGE_FILES (This used to be commit c5423ea22bdaa055807d4e6f7ac4be934194fe45)
Diffstat (limited to 'source4/torture/raw')
-rw-r--r--source4/torture/raw/read.c5
-rw-r--r--source4/torture/raw/write.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/source4/torture/raw/read.c b/source4/torture/raw/read.c
index bb27ba71e5..f9c44e036e 100644
--- a/source4/torture/raw/read.c
+++ b/source4/torture/raw/read.c
@@ -522,6 +522,11 @@ static BOOL test_readx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
status = smb_raw_read(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_FILE_LOCK_CONFLICT);
+ if (!(cli->transport->negotiate.capabilities & CAP_LARGE_FILES)) {
+ printf("skipping large file tests - CAP_LARGE_FILES not set\n");
+ goto done;
+ }
+
printf("Trying large offset read\n");
io.readx.in.offset = ((uint64_t)0x2) << 32;
io.readx.in.mincnt = 10;
diff --git a/source4/torture/raw/write.c b/source4/torture/raw/write.c
index 03c3897c74..046ca8c4f9 100644
--- a/source4/torture/raw/write.c
+++ b/source4/torture/raw/write.c
@@ -182,6 +182,11 @@ static BOOL test_write(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("Setting file as sparse\n");
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);