source: trunk/server/source4/torture/torture.c

Last change on this file was 745, checked in by Silvan Scherrer, 13 years ago

Samba Server: updated trunk to 3.6.0

File size: 2.0 KB
Line 
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 "param/param.h"
24#include "lib/cmdline/popt_common.h"
25#include "torture/smbtorture.h"
26
27_PUBLIC_ int torture_numops=10;
28_PUBLIC_ int torture_entries=1000;
29_PUBLIC_ int torture_failures=1;
30_PUBLIC_ int torture_seed=0;
31_PUBLIC_ int torture_numasync=100;
32
33struct torture_suite *torture_root = NULL;
34
35bool torture_register_suite(struct torture_suite *suite)
36{
37 if (!suite)
38 return true;
39
40 if (torture_root == NULL)
41 torture_root = talloc_zero(talloc_autofree_context(), struct torture_suite);
42
43 return torture_suite_add_suite(torture_root, suite);
44}
45
46#ifndef ENABLE_LIBNETAPI
47NTSTATUS torture_libnetapi_init(void)
48{
49 return NT_STATUS_OK;
50}
51#endif
52
53#ifndef ENABLE_LIBSMBCLIENT
54NTSTATUS torture_libsmbclient_init(void)
55{
56 return NT_STATUS_OK;
57}
58#endif
59
60_PUBLIC_ int torture_init(void)
61{
62#define _MODULE_PROTO(init) extern NTSTATUS init(void);
63 STATIC_smbtorture_MODULES_PROTO;
64 init_module_fn static_init[] = { STATIC_smbtorture_MODULES };
65 init_module_fn *shared_init = load_samba_modules(NULL, cmdline_lp_ctx, "smbtorture");
66
67 run_init_functions(static_init);
68 run_init_functions(shared_init);
69
70 talloc_free(shared_init);
71
72 return 0;
73}
Note: See TracBrowser for help on using the repository browser.