1 | /*
|
---|
2 | Unix SMB/CIFS implementation.
|
---|
3 | SMB torture tester
|
---|
4 | Copyright (C) Andrew Tridgell 1997-2003
|
---|
5 | Copyright (C) Jelmer Vernooij 2006
|
---|
6 |
|
---|
7 | This program is free software; you can redistribute it and/or modify
|
---|
8 | it under the terms of the GNU General Public License as published by
|
---|
9 | the Free Software Foundation; either version 3 of the License, or
|
---|
10 | (at your option) any later version.
|
---|
11 |
|
---|
12 | This program is distributed in the hope that it will be useful,
|
---|
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
15 | GNU General Public License for more details.
|
---|
16 |
|
---|
17 | You should have received a copy of the GNU General Public License
|
---|
18 | along with this program. If not, see <http://www.gnu.org/licenses/>.
|
---|
19 | */
|
---|
20 |
|
---|
21 | #include "includes.h"
|
---|
22 | #include "system/time.h"
|
---|
23 | #include "torture/torture.h"
|
---|
24 | #include "../lib/util/dlinklist.h"
|
---|
25 | #include "param/param.h"
|
---|
26 | #include "lib/cmdline/popt_common.h"
|
---|
27 | #include "torture/smbtorture.h"
|
---|
28 |
|
---|
29 | _PUBLIC_ int torture_numops=10;
|
---|
30 | _PUBLIC_ int torture_entries=1000;
|
---|
31 | _PUBLIC_ int torture_failures=1;
|
---|
32 | _PUBLIC_ int torture_seed=0;
|
---|
33 | _PUBLIC_ int torture_numasync=100;
|
---|
34 |
|
---|
35 | struct torture_suite *torture_root = NULL;
|
---|
36 |
|
---|
37 | bool torture_register_suite(struct torture_suite *suite)
|
---|
38 | {
|
---|
39 | if (!suite)
|
---|
40 | return true;
|
---|
41 |
|
---|
42 | if (torture_root == NULL)
|
---|
43 | torture_root = talloc_zero(talloc_autofree_context(), struct torture_suite);
|
---|
44 |
|
---|
45 | return torture_suite_add_suite(torture_root, suite);
|
---|
46 | }
|
---|
47 |
|
---|
48 | #ifndef ENABLE_LIBNETAPI
|
---|
49 | NTSTATUS torture_libnetapi_init(void)
|
---|
50 | {
|
---|
51 | return NT_STATUS_OK;
|
---|
52 | }
|
---|
53 | #endif
|
---|
54 |
|
---|
55 | _PUBLIC_ int torture_init(void)
|
---|
56 | {
|
---|
57 | extern NTSTATUS torture_base_init(void);
|
---|
58 | extern NTSTATUS torture_ldap_init(void);
|
---|
59 | extern NTSTATUS torture_local_init(void);
|
---|
60 | extern NTSTATUS torture_nbt_init(void);
|
---|
61 | extern NTSTATUS torture_nbench_init(void);
|
---|
62 | extern NTSTATUS torture_rap_init(void);
|
---|
63 | extern NTSTATUS torture_rpc_init(void);
|
---|
64 | extern NTSTATUS torture_ntp_init(void);
|
---|
65 | extern NTSTATUS torture_smb2_init(void);
|
---|
66 | extern NTSTATUS torture_net_init(void);
|
---|
67 | extern NTSTATUS torture_libnetapi_init(void);
|
---|
68 | extern NTSTATUS torture_raw_init(void);
|
---|
69 | extern NTSTATUS torture_unix_init(void);
|
---|
70 | extern NTSTATUS torture_winbind_init(void);
|
---|
71 | init_module_fn static_init[] = { STATIC_smbtorture_MODULES };
|
---|
72 | init_module_fn *shared_init = load_samba_modules(NULL, cmdline_lp_ctx, "smbtorture");
|
---|
73 |
|
---|
74 | run_init_functions(static_init);
|
---|
75 | run_init_functions(shared_init);
|
---|
76 |
|
---|
77 | talloc_free(shared_init);
|
---|
78 |
|
---|
79 | return 0;
|
---|
80 | }
|
---|