summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-08-22 11:23:22 +0000
committerJeremy Allison <jra@samba.org>2013-08-23 09:48:51 -0700
commite1edffc8075cc0f83e0f05153712298a96063fba (patch)
tree5068f168121bbaad5f28c050e233048332f5e2df /source4/torture
parent8f96d489715d88c181d88030550a88a7e245e5ae (diff)
downloadsamba-e1edffc8075cc0f83e0f05153712298a96063fba.tar.gz
samba-e1edffc8075cc0f83e0f05153712298a96063fba.tar.bz2
samba-e1edffc8075cc0f83e0f05153712298a96063fba.zip
torture: Split the buffercheck into a separate test
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/smb2/getinfo.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source4/torture/smb2/getinfo.c b/source4/torture/smb2/getinfo.c
index f60db95088..7e37c88aaa 100644
--- a/source4/torture/smb2/getinfo.c
+++ b/source4/torture/smb2/getinfo.c
@@ -152,13 +152,19 @@ static bool torture_smb2_fsinfo(struct torture_context *tctx, struct smb2_tree *
/*
test for buffer size handling
*/
-static bool torture_smb2_buffercheck(struct torture_context *tctx, struct smb2_tree *tree)
+static bool torture_smb2_buffercheck(struct torture_context *tctx)
{
+ bool ret;
+ struct smb2_tree *tree;
NTSTATUS status;
struct smb2_handle handle;
struct smb2_getinfo b;
printf("Testing buffer size handling\n");
+
+ ret = torture_smb2_connection(tctx, &tree);
+ torture_assert(tctx, ret, "connection failed");
+
status = smb2_util_roothandle(tree, &handle);
torture_assert_ntstatus_ok(tctx, status, "Unable to create root handle");
@@ -209,7 +215,6 @@ static bool torture_smb2_getinfo(struct torture_context *torture)
ret &= torture_smb2_fileinfo(torture, tree);
ret &= torture_smb2_fsinfo(torture, tree);
- ret &= torture_smb2_buffercheck(torture, tree);
return ret;
}
@@ -220,5 +225,7 @@ struct torture_suite *torture_smb2_getinfo_init(void)
talloc_autofree_context(), "getinfo");
torture_suite_add_simple_test(suite, "complex", torture_smb2_getinfo);
+ torture_suite_add_simple_test(suite, "buffercheck",
+ torture_smb2_buffercheck);
return suite;
}