1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

torture: convert mangling test to a suite

More tests to come...

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Ralph Boehme 2022-12-01 06:09:09 +01:00 committed by Jeremy Allison
parent 0fa7c3f70c
commit 08997ac1a7
2 changed files with 14 additions and 3 deletions

View File

@ -201,8 +201,8 @@ static char *gen_name(struct torture_context *tctx)
}
bool torture_smb2_mangle(struct torture_context *torture,
struct smb2_tree *tree)
static bool torture_smb2_mangle(struct torture_context *torture,
struct smb2_tree *tree)
{
extern int torture_numops;
int i;
@ -245,3 +245,14 @@ bool torture_smb2_mangle(struct torture_context *torture,
return (failures == 0);
}
struct torture_suite *torture_smb2_name_mangling_init(TALLOC_CTX *ctx)
{
struct torture_suite *suite = NULL;
suite = torture_suite_create(ctx, "name-mangling");
suite->description = talloc_strdup(suite, "SMB2 name mangling tests");
torture_suite_add_1smb2_test(suite, "mangle", torture_smb2_mangle);
return suite;
}

View File

@ -210,9 +210,9 @@ NTSTATUS torture_smb2_init(TALLOC_CTX *ctx)
torture_suite_add_1smb2_test(suite, "sdread", torture_smb2_sdreadtest);
torture_suite_add_suite(suite, torture_smb2_readwrite_init(suite));
torture_suite_add_suite(suite, torture_smb2_max_allowed(suite));
torture_suite_add_1smb2_test(suite, "mangle", torture_smb2_mangle);
torture_suite_add_1smb2_test(suite, "tcon", run_tcon_test);
torture_suite_add_1smb2_test(suite, "mkdir", torture_smb2_mkdir);
torture_suite_add_suite(suite, torture_smb2_name_mangling_init(suite));
torture_suite_add_suite(suite, torture_smb2_charset(suite));
torture_suite_add_1smb2_test(suite, "secleak", torture_smb2_sec_leak);