diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-10-12 18:34:26 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2011-10-15 20:49:01 +0200 |
commit | 9bfd1fe1f445f8e167a38f8ff3f9c039d729f78b (patch) | |
tree | 766d5c98fcb11ff8c5e72d2b7145483481f02540 | |
parent | 9ee7017a3abb868f9bd15b79ebb9e1654780d131 (diff) | |
download | samba-9bfd1fe1f445f8e167a38f8ff3f9c039d729f78b.tar.gz samba-9bfd1fe1f445f8e167a38f8ff3f9c039d729f78b.tar.xz samba-9bfd1fe1f445f8e167a38f8ff3f9c039d729f78b.zip |
s4:torture/smb2: we only support 64KB reads/writes for now
We don't have multi-credit support yet.
metze
(cherry picked from commit 77f739f03a32965b676d97a6f082bb3e023014ef)
(cherry picked from commit 69be2b1cd34cec481c252883a6713c1ed672a7f8)
-rw-r--r-- | source4/torture/smb2/connect.c | 12 | ||||
-rw-r--r-- | source4/torture/smb2/read.c | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/source4/torture/smb2/connect.c b/source4/torture/smb2/connect.c index 1b69c18a553..b383a67a44b 100644 --- a/source4/torture/smb2/connect.c +++ b/source4/torture/smb2/connect.c @@ -71,14 +71,14 @@ static NTSTATUS torture_smb2_write(struct torture_context *tctx, struct smb2_tre NTSTATUS status; DATA_BLOB data; int i; + uint32_t size = torture_setting_int(tctx, "smb2maxwrite", 64*1024); - if (torture_setting_bool(tctx, "dangerous", false)) { - data = data_blob_talloc(tree, NULL, 160000); - } else if (torture_setting_bool(tctx, "samba4", false)) { - data = data_blob_talloc(tree, NULL, UINT16_MAX); - } else { - data = data_blob_talloc(tree, NULL, torture_setting_int(tctx, "smb2maxwrite", 120000)); + data = data_blob_talloc(tree, NULL, size); + if (size != data.length) { + printf("data_blob_talloc(%s) failed\n", size); + return NT_STATUS_NO_MEMORY; } + for (i=0;i<data.length;i++) { data.data[i] = i; } diff --git a/source4/torture/smb2/read.c b/source4/torture/smb2/read.c index f27ce244139..076ae9c23e1 100644 --- a/source4/torture/smb2/read.c +++ b/source4/torture/smb2/read.c @@ -51,7 +51,7 @@ static bool test_read_eof(struct torture_context *torture, struct smb2_tree *tre bool ret = true; NTSTATUS status; struct smb2_handle h; - uint8_t buf[70000]; + uint8_t buf[64*1024]; struct smb2_read rd; TALLOC_CTX *tmp_ctx = talloc_new(tree); @@ -134,7 +134,7 @@ static bool test_read_position(struct torture_context *torture, struct smb2_tree bool ret = true; NTSTATUS status; struct smb2_handle h; - uint8_t buf[70000]; + uint8_t buf[64*1024]; struct smb2_read rd; TALLOC_CTX *tmp_ctx = talloc_new(tree); union smb_fileinfo info; |