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

smbtorture: turn maximum_allowed test into a test suite

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14215

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Ralph Boehme 2022-08-19 10:45:10 +02:00 committed by Jeremy Allison
parent 12e0c57978
commit c73d666e5a
3 changed files with 12 additions and 4 deletions

View File

@ -118,7 +118,7 @@
^samba4.smb2.charset.*.Testing partial surrogate # This test is currently broken
^samba3.smb2.charset.*.Testing partial surrogate # This test is currently broken
^samba4.*.base.maximum_allowed # broken until we implement NTCREATEX_OPTIONS_BACKUP_INTENT
^samba..*.smb2.maximum_allowed
^samba..*.smb2.maximum_allowed.maximum_allowed
.*net.api.delshare.* # DelShare isn't implemented yet
^samba4.smb2.oplock.doc
^samba4.smb2.lock.valid-request

View File

@ -27,8 +27,8 @@
#include "torture/smb2/proto.h"
#define MAXIMUM_ALLOWED_FILE "torture_maximum_allowed"
bool torture_smb2_maximum_allowed(struct torture_context *tctx,
struct smb2_tree *tree)
static bool torture_smb2_maximum_allowed(struct torture_context *tctx,
struct smb2_tree *tree)
{
struct security_descriptor *sd = NULL, *sd_orig = NULL;
struct smb2_create io = {0};
@ -190,3 +190,11 @@ bool torture_smb2_maximum_allowed(struct torture_context *tctx,
talloc_free(mem_ctx);
return ret;
}
struct torture_suite *torture_smb2_max_allowed(TALLOC_CTX *ctx)
{
struct torture_suite *suite = torture_suite_create(ctx, "maximum_allowed");
torture_suite_add_1smb2_test(suite, "maximum_allowed", torture_smb2_maximum_allowed);
return suite;
}

View File

@ -205,7 +205,7 @@ NTSTATUS torture_smb2_init(TALLOC_CTX *ctx)
torture_suite_add_1smb2_test(suite, "winattr", torture_smb2_winattrtest);
torture_suite_add_1smb2_test(suite, "sdread", torture_smb2_sdreadtest);
torture_suite_add_suite(suite, torture_smb2_readwrite_init(suite));
torture_suite_add_1smb2_test(suite, "maximum_allowed", torture_smb2_maximum_allowed);
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);