summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-09-10 08:08:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:18:08 -0500
commit3cc41b70daac63fc07756d73e8fd8e89450882c4 (patch)
tree3a7eceb17dbf22d987e4c11ff2b558b881ad32eb
parent89efea81d9d67ebed159321e8ea496eee54c2deb (diff)
downloadsamba-3cc41b70daac63fc07756d73e8fd8e89450882c4.tar.gz
samba-3cc41b70daac63fc07756d73e8fd8e89450882c4.tar.bz2
samba-3cc41b70daac63fc07756d73e8fd8e89450882c4.zip
r18320: the raw write size limit test hurts too many hosts. Limit it to 2^33
bytes if --dangerous is not set. (This used to be commit 90e5136ea4a47ecb59426fe547ae92db1fd8657a)
-rw-r--r--source4/torture/raw/write.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source4/torture/raw/write.c b/source4/torture/raw/write.c
index 468092f624..03c3897c74 100644
--- a/source4/torture/raw/write.c
+++ b/source4/torture/raw/write.c
@@ -224,6 +224,12 @@ static BOOL test_writex(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
const char *fname = BASEDIR "\\test.txt";
uint_t seed = time(NULL);
union smb_fileinfo finfo;
+ int max_bits=63;
+
+ if (!lp_parm_bool(-1, "torture", "dangerous", False)) {
+ max_bits=33;
+ printf("dangerous not set - limiting range of test to 2^%d\n", max_bits);
+ }
buf = talloc_zero_size(mem_ctx, maxsize);
@@ -350,7 +356,7 @@ static BOOL test_writex(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
}
CHECK_BUFFER(buf, seed, 4000);
- for (i=33;i<64;i++) {
+ for (i=33;i<max_bits;i++) {
printf("Trying 2^%d offset\n", i);
setup_buffer(buf, seed+1, maxsize);
io.writex.in.file.fnum = fnum;