summaryrefslogtreecommitdiff
path: root/source4/torture/torture.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-08-31 18:35:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:03:19 -0500
commit275a8c918321d3c94aba912b6f126b470faf44aa (patch)
tree064698ac6b3bf35237e0165b75dd39a76f734bdc /source4/torture/torture.c
parent9c006b122f1bd6dda101e0fe2cb68d89476252a9 (diff)
downloadsamba-275a8c918321d3c94aba912b6f126b470faf44aa.tar.gz
r24851: Add --load-module argument to smbtorture.
(This used to be commit 76a713b6786e22b810937289b3e7cc6700a0b49d)
Diffstat (limited to 'source4/torture/torture.c')
-rw-r--r--source4/torture/torture.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/torture/torture.c b/source4/torture/torture.c
index 9231fe45edd..803e0c6bd78 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);