1
0
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:
Jeremy Allison
2017-04-24 14:27:36 -07:00
parent 6341d3d59f
commit 1d6667381c
3 changed files with 6 additions and 6 deletions

View File

@ -584,7 +584,7 @@ int main(int argc, const char *argv[])
}
}
} else {
torture_init();
torture_init(mem_ctx);
}
if (list_testsuites) {

View File

@ -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);

View File

@ -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);