From 275a8c918321d3c94aba912b6f126b470faf44aa Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 31 Aug 2007 18:35:30 +0000 Subject: r24851: Add --load-module argument to smbtorture. (This used to be commit 76a713b6786e22b810937289b3e7cc6700a0b49d) --- source4/torture/torture.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source4/torture/torture.c') diff --git a/source4/torture/torture.c b/source4/torture/torture.c index 9231fe45ed..803e0c6bd7 100644 --- a/source4/torture/torture.c +++ b/source4/torture/torture.c @@ -32,13 +32,16 @@ _PUBLIC_ int torture_failures=1; _PUBLIC_ int torture_seed=0; _PUBLIC_ int torture_numasync=100; -struct torture_suite *torture_root = NULL; +struct torture_suite *torture_root; bool torture_register_suite(struct torture_suite *suite) { if (!suite) return true; + if (torture_root == NULL) + torture_root = talloc_zero(talloc_autofree_context(), struct torture_suite); + return torture_suite_add_suite(torture_root, suite); } @@ -63,9 +66,6 @@ int torture_init(void) init_module_fn static_init[] = STATIC_torture_MODULES; init_module_fn *shared_init = load_samba_modules(NULL, "torture"); - torture_root = talloc_zero(talloc_autofree_context(), - struct torture_suite); - run_init_functions(static_init); run_init_functions(shared_init); -- cgit