summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/smb2/scan.c22
-rw-r--r--source4/torture/smb2/smb2.c5
2 files changed, 19 insertions, 8 deletions
diff --git a/source4/torture/smb2/scan.c b/source4/torture/smb2/scan.c
index 92fbc682c4..18a5cbf312 100644
--- a/source4/torture/smb2/scan.c
+++ b/source4/torture/smb2/scan.c
@@ -32,7 +32,7 @@
/*
scan for valid SMB2 getinfo levels
*/
-bool torture_smb2_getinfo_scan(struct torture_context *torture)
+static bool torture_smb2_getinfo_scan(struct torture_context *torture)
{
struct smb2_tree *tree;
NTSTATUS status;
@@ -108,7 +108,7 @@ bool torture_smb2_getinfo_scan(struct torture_context *torture)
/*
scan for valid SMB2 setinfo levels
*/
-bool torture_smb2_setinfo_scan(struct torture_context *torture)
+static bool torture_smb2_setinfo_scan(struct torture_context *torture)
{
static const char *FNAME = "scan-setinfo.dat";
static const char *FNAME2 = "scan-setinfo.dat:2ndstream";
@@ -156,7 +156,7 @@ bool torture_smb2_setinfo_scan(struct torture_context *torture)
/*
scan for valid SMB2 scan levels
*/
-bool torture_smb2_find_scan(struct torture_context *torture)
+static bool torture_smb2_find_scan(struct torture_context *torture)
{
struct smb2_tree *tree;
NTSTATUS status;
@@ -200,7 +200,7 @@ bool torture_smb2_find_scan(struct torture_context *torture)
/*
scan for valid SMB2 opcodes
*/
-bool torture_smb2_scan(struct torture_context *torture)
+static bool torture_smb2_scan(struct torture_context *torture)
{
TALLOC_CTX *mem_ctx = talloc_new(NULL);
struct smb2_tree *tree;
@@ -256,3 +256,17 @@ bool torture_smb2_scan(struct torture_context *torture)
return true;
}
+
+struct torture_suite *torture_smb2_scan_init(void)
+{
+ struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "scan");
+
+ torture_suite_add_simple_test(suite, "scan", torture_smb2_scan);
+ torture_suite_add_simple_test(suite, "getinfo", torture_smb2_getinfo_scan);
+ torture_suite_add_simple_test(suite, "setinfo", torture_smb2_setinfo_scan);
+ torture_suite_add_simple_test(suite, "find", torture_smb2_find_scan);
+
+ suite->description = talloc_strdup(suite, "scan target (not a test)");
+
+ return suite;
+}
diff --git a/source4/torture/smb2/smb2.c b/source4/torture/smb2/smb2.c
index d5fc1db152..9ea71b463e 100644
--- a/source4/torture/smb2/smb2.c
+++ b/source4/torture/smb2/smb2.c
@@ -140,10 +140,7 @@ NTSTATUS torture_smb2_init(void)
{
struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "smb2");
torture_suite_add_simple_test(suite, "connect", torture_smb2_connect);
- torture_suite_add_simple_test(suite, "scan", torture_smb2_scan);
- torture_suite_add_simple_test(suite, "scangetinfo", torture_smb2_getinfo_scan);
- torture_suite_add_simple_test(suite, "scansetinfo", torture_smb2_setinfo_scan);
- torture_suite_add_simple_test(suite, "scanfind", torture_smb2_find_scan);
+ torture_suite_add_suite(suite, torture_smb2_scan_init());
torture_suite_add_simple_test(suite, "getinfo", torture_smb2_getinfo);
torture_suite_add_simple_test(suite, "setinfo", torture_smb2_setinfo);
torture_suite_add_suite(suite, torture_smb2_lock_init());