mirror of
https://github.com/samba-team/samba.git
synced 2025-08-26 01:49:31 +03:00
s4: torture: Pass the new talloc context into torture_init().
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
This commit is contained in:
@ -584,7 +584,7 @@ int main(int argc, const char *argv[])
|
||||
}
|
||||
}
|
||||
} else {
|
||||
torture_init();
|
||||
torture_init(mem_ctx);
|
||||
}
|
||||
|
||||
if (list_testsuites) {
|
||||
|
@ -34,7 +34,7 @@ extern int torture_failures;
|
||||
extern int torture_numasync;
|
||||
|
||||
struct torture_test;
|
||||
int torture_init(void);
|
||||
int torture_init(TALLOC_CTX *);
|
||||
bool torture_register_suite(struct torture_suite *suite);
|
||||
void torture_shell(struct torture_context *tctx);
|
||||
void torture_print_testsuites(bool structured);
|
||||
|
@ -44,15 +44,15 @@ bool torture_register_suite(struct torture_suite *suite)
|
||||
return torture_suite_add_suite(torture_root, suite);
|
||||
}
|
||||
|
||||
_PUBLIC_ int torture_init(void)
|
||||
_PUBLIC_ int torture_init(TALLOC_CTX *mem_ctx)
|
||||
{
|
||||
#define _MODULE_PROTO(init) extern NTSTATUS init(TALLOC_CTX *);
|
||||
STATIC_smbtorture_MODULES_PROTO;
|
||||
init_module_fn static_init[] = { STATIC_smbtorture_MODULES };
|
||||
init_module_fn *shared_init = load_samba_modules(NULL, "smbtorture");
|
||||
init_module_fn *shared_init = load_samba_modules(mem_ctx, "smbtorture");
|
||||
|
||||
run_init_functions(NULL, static_init);
|
||||
run_init_functions(NULL, shared_init);
|
||||
run_init_functions(mem_ctx, static_init);
|
||||
run_init_functions(mem_ctx, shared_init);
|
||||
|
||||
talloc_free(shared_init);
|
||||
|
||||
|
Reference in New Issue
Block a user