From 87e8218d09088fbc13901ead300f7a5d1712f9a3 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 17 Oct 2006 12:06:20 +0000 Subject: r19369: - we need to set the target:samba3 before calling torture_init() otherwise BASE-DELETE will run all tests - call ldb_global_init() directly after torture_init() this isn't strictly needed but looks better metze (This used to be commit 0c26c2aefdb603c5ffc87e9c0db0e9b2b34ec0ab) --- source4/torture/smbtorture.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'source4') diff --git a/source4/torture/smbtorture.c b/source4/torture/smbtorture.c index 3733d72492..d83d1310ae 100644 --- a/source4/torture/smbtorture.c +++ b/source4/torture/smbtorture.c @@ -518,6 +518,12 @@ const static struct torture_ui_ops quiet_ui_ops = { } } + if (strcmp(target, "samba3") == 0) { + lp_set_cmdline("target:samba3", "true"); + } else if (strcmp(target, "samba4") == 0) { + lp_set_cmdline("target:samba4", "true"); + } + if (max_runtime) { /* this will only work if nobody else uses alarm(), which means it won't work for some tests, but we @@ -529,6 +535,7 @@ const static struct torture_ui_ops quiet_ui_ops = { } torture_init(); + ldb_global_init(); subunit_dir = lp_parm_string_list(-1, "torture", "subunitdir", ":"); if (subunit_dir == NULL) @@ -538,10 +545,6 @@ const static struct torture_ui_ops quiet_ui_ops = { torture_subunit_load_testsuites(subunit_dir[i], true, NULL); } - - - ldb_global_init(); - if (torture_seed == 0) { torture_seed = time(NULL); } @@ -563,12 +566,6 @@ const static struct torture_ui_ops quiet_ui_ops = { exit(1); } - if (strcmp(target, "samba3") == 0) { - lp_set_cmdline("target:samba3", "true"); - } else if (strcmp(target, "samba4") == 0) { - lp_set_cmdline("target:samba4", "true"); - } - /* see if its a RPC transport specifier */ if (is_binding_string(argv_new[1])) { lp_set_cmdline("torture:binding", argv_new[1]); -- cgit