summaryrefslogtreecommitdiff
path: root/source4/torture/smb2/connect.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-09-22 04:04:46 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:19:13 -0500
commit8c3b54f01dfc7275c7ff0ec194cd68ea072a8186 (patch)
tree6d34b821a0993372a937c553a723c0cf174917fa /source4/torture/smb2/connect.c
parent4f913d91cb75377555d2858becde0f34ab7f6f49 (diff)
downloadsamba-8c3b54f01dfc7275c7ff0ec194cd68ea072a8186.tar.gz
samba-8c3b54f01dfc7275c7ff0ec194cd68ea072a8186.tar.bz2
samba-8c3b54f01dfc7275c7ff0ec194cd68ea072a8186.zip
r18808: added SMB2-MAXWRITE test and SMB2-DIR tests
expanded size of dangerous level for write in SMB2-CONNECT test (This used to be commit 355c6e78a91f4e934479829e722f873ca7e66baf)
Diffstat (limited to 'source4/torture/smb2/connect.c')
-rw-r--r--source4/torture/smb2/connect.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source4/torture/smb2/connect.c b/source4/torture/smb2/connect.c
index 9f36e4d707..bb6ba0c39d 100644
--- a/source4/torture/smb2/connect.c
+++ b/source4/torture/smb2/connect.c
@@ -75,7 +75,7 @@ static NTSTATUS torture_smb2_write(struct smb2_tree *tree, struct smb2_handle ha
int i;
if (lp_parm_bool(-1, "torture", "dangerous", False)) {
- data = data_blob_talloc(tree, NULL, 160000);
+ data = data_blob_talloc(tree, NULL, 16000000);
} else if (lp_parm_bool(-1, "target", "samba4", False)) {
data = data_blob_talloc(tree, NULL, UINT16_MAX);
} else {
@@ -90,6 +90,8 @@ static NTSTATUS torture_smb2_write(struct smb2_tree *tree, struct smb2_handle ha
w.in.offset = 0;
w.in.data = data;
+ printf("writing %d bytes\n", data.length);
+
status = smb2_write(tree, &w);
if (!NT_STATUS_IS_OK(status)) {
printf("write failed - %s\n", nt_errstr(status));
@@ -120,6 +122,8 @@ static NTSTATUS torture_smb2_write(struct smb2_tree *tree, struct smb2_handle ha
r.in.length = data.length;
r.in.offset = 0;
+ printf("reading %d bytes\n", data.length);
+
status = smb2_read(tree, tree, &r);
if (!NT_STATUS_IS_OK(status)) {
printf("read failed - %s\n", nt_errstr(status));
@@ -139,8 +143,7 @@ static NTSTATUS torture_smb2_write(struct smb2_tree *tree, struct smb2_handle ha
/*
send a create
*/
-static struct smb2_handle torture_smb2_create(struct smb2_tree *tree,
- const char *fname)
+struct smb2_handle torture_smb2_create(struct smb2_tree *tree, const char *fname)
{
struct smb2_create io;
NTSTATUS status;