diff options
author | Gregor Beck <gbeck@sernet.de> | 2012-03-01 15:59:41 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-03-06 23:53:07 +0100 |
commit | 46a96c42a2fe29b3176047ce1024e016716df187 (patch) | |
tree | 7376b53d9571aa4c98d8dd6670106a77171c7b39 | |
parent | 59f818d80b4cdf4f67b653d3754e4eebe279915b (diff) | |
download | samba-46a96c42a2fe29b3176047ce1024e016716df187.tar.gz samba-46a96c42a2fe29b3176047ce1024e016716df187.tar.bz2 samba-46a96c42a2fe29b3176047ce1024e016716df187.zip |
s4:torture make a suite for smb2.*scan
Signed-off-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r-- | source4/torture/smb2/scan.c | 22 | ||||
-rw-r--r-- | source4/torture/smb2/smb2.c | 5 |
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()); |