[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha3-1502-gd5bf4e9

Jelmer Vernooij jelmer at samba.org
Sat May 10 21:48:01 GMT 2008


The branch, v4-0-test has been updated
       via  d5bf4e9065303b54421a6f35b213a22f062d27d4 (commit)
       via  c6c4349c44cb6479fa7aa129931ff9ac88068ba6 (commit)
      from  bb5c9fc64b6ad275abdd98a19f018953c9d79cbd (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test


- Log -----------------------------------------------------------------
commit d5bf4e9065303b54421a6f35b213a22f062d27d4
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat May 10 23:46:51 2008 +0200

    Fix torture module initializion.

commit c6c4349c44cb6479fa7aa129931ff9ac88068ba6
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat May 10 23:38:56 2008 +0200

    Revert "Remove copy of torture file."
    
    This reverts commit 89bfca2da2b614e979a20c9a293b798ed7ae15ae.

-----------------------------------------------------------------------

Summary of changes:
 source/lib/crypto/config.mk      |    2 +-
 source/torture/config.mk         |   22 ++++++------
 source/torture/local/config.mk   |    2 +-
 source/torture/smb2/config.mk    |    2 +-
 source/torture/torture.c         |   71 ++++++++++++++++++++++++++++++++++++++
 source/torture/winbind/config.mk |    2 +-
 6 files changed, 86 insertions(+), 15 deletions(-)
 create mode 100644 source/torture/torture.c


Changeset truncated at 500 lines:

diff --git a/source/lib/crypto/config.mk b/source/lib/crypto/config.mk
index 82dbe4a..8e0cba1 100644
--- a/source/lib/crypto/config.mk
+++ b/source/lib/crypto/config.mk
@@ -10,7 +10,7 @@ LIBCRYPTO_OBJ_FILES = $(addprefix lib/crypto/, \
 
 
 [MODULE::TORTURE_LIBCRYPTO]
-SUBSYSTEM = torture
+SUBSYSTEM = smbtorture
 PRIVATE_DEPENDENCIES = LIBCRYPTO
 PRIVATE_PROTO_HEADER = test_proto.h
 
diff --git a/source/torture/config.mk b/source/torture/config.mk
index 27d168f..ee9f8b7 100644
--- a/source/torture/config.mk
+++ b/source/torture/config.mk
@@ -7,7 +7,7 @@ TORTURE_UTIL_OBJ_FILES = $(addprefix torture/, util_smb.o)
 #################################
 # Start SUBSYSTEM TORTURE_BASIC
 [MODULE::TORTURE_BASIC]
-SUBSYSTEM = torture
+SUBSYSTEM = smbtorture
 INIT_FUNCTION = torture_base_init
 PRIVATE_PROTO_HEADER = \
 		basic/proto.h
@@ -42,7 +42,7 @@ TORTURE_BASIC_OBJ_FILES = $(addprefix torture/basic/,  \
 #################################
 # Start SUBSYSTEM TORTURE_RAW
 [MODULE::TORTURE_RAW]
-SUBSYSTEM = torture
+SUBSYSTEM = smbtorture
 INIT_FUNCTION = torture_raw_init
 PRIVATE_PROTO_HEADER = \
 		raw/proto.h
@@ -97,7 +97,7 @@ TORTURE_NDR_OBJ_FILES = $(addprefix torture/ndr/, ndr.o winreg.o atsvc.o lsa.o e
 [MODULE::torture_rpc]
 # TORTURE_NET and TORTURE_NBT use functions from torture_rpc...
 #OUTPUT_TYPE = MERGED_OBJ
-SUBSYSTEM = torture
+SUBSYSTEM = smbtorture
 INIT_FUNCTION = torture_rpc_init
 PRIVATE_PROTO_HEADER = \
 		rpc/proto.h
@@ -123,7 +123,7 @@ torture_rpc_OBJ_FILES = $(addprefix torture/rpc/, \
 #################################
 # Start SUBSYSTEM TORTURE_RAP
 [MODULE::TORTURE_RAP]
-SUBSYSTEM = torture
+SUBSYSTEM = smbtorture
 INIT_FUNCTION = torture_rap_init
 PRIVATE_PROTO_HEADER = \
 		rap/proto.h
@@ -136,7 +136,7 @@ TORTURE_RAP_OBJ_FILES = torture/rap/rap.o
 #################################
 # Start SUBSYSTEM TORTURE_AUTH
 [MODULE::TORTURE_AUTH]
-SUBSYSTEM = torture
+SUBSYSTEM = smbtorture
 PRIVATE_PROTO_HEADER = \
 		auth/proto.h
 PRIVATE_DEPENDENCIES = \
@@ -152,7 +152,7 @@ mkinclude local/config.mk
 #################################
 # Start MODULE TORTURE_NBENCH
 [MODULE::TORTURE_NBENCH]
-SUBSYSTEM = torture
+SUBSYSTEM = smbtorture
 INIT_FUNCTION = torture_nbench_init
 PRIVATE_DEPENDENCIES = TORTURE_UTIL 
 PRIVATE_PROTO_HEADER = \
@@ -165,7 +165,7 @@ TORTURE_NBENCH_OBJ_FILES = $(addprefix torture/nbench/, nbio.o nbench.o)
 #################################
 # Start MODULE TORTURE_UNIX
 [MODULE::TORTURE_UNIX]
-SUBSYSTEM = torture
+SUBSYSTEM = smbtorture
 INIT_FUNCTION = torture_unix_init
 PRIVATE_DEPENDENCIES = TORTURE_UTIL 
 PRIVATE_PROTO_HEADER = \
@@ -178,7 +178,7 @@ TORTURE_UNIX_OBJ_FILES = $(addprefix torture/unix/, unix.o whoami.o unix_info2.o
 #################################
 # Start SUBSYSTEM TORTURE_LDAP
 [MODULE::TORTURE_LDAP]
-SUBSYSTEM = torture
+SUBSYSTEM = smbtorture
 INIT_FUNCTION = torture_ldap_init
 PRIVATE_PROTO_HEADER = \
 		ldap/proto.h
@@ -193,7 +193,7 @@ TORTURE_LDAP_OBJ_FILES = $(addprefix torture/ldap/, common.o basic.o schema.o up
 #################################
 # Start SUBSYSTEM TORTURE_NBT
 [MODULE::TORTURE_NBT]
-SUBSYSTEM = torture
+SUBSYSTEM = smbtorture
 INIT_FUNCTION = torture_nbt_init
 PRIVATE_PROTO_HEADER = \
 		nbt/proto.h
@@ -209,7 +209,7 @@ TORTURE_NBT_OBJ_FILES = $(addprefix torture/nbt/, query.o register.o \
 #################################
 # Start SUBSYSTEM TORTURE_NET
 [MODULE::TORTURE_NET]
-SUBSYSTEM = torture
+SUBSYSTEM = smbtorture
 INIT_FUNCTION = torture_net_init
 PRIVATE_PROTO_HEADER = \
 		libnet/proto.h
@@ -241,7 +241,7 @@ PRIVATE_DEPENDENCIES = \
 # End BINARY smbtorture
 #################################
 
-smbtorture_OBJ_FILES = torture/smbtorture.o 
+smbtorture_OBJ_FILES = torture/smbtorture.o torture/torture.o 
 
 PUBLIC_HEADERS += torture/smbtorture.h
 MANPAGES += torture/man/smbtorture.1
diff --git a/source/torture/local/config.mk b/source/torture/local/config.mk
index efdea7f..d7cac10 100644
--- a/source/torture/local/config.mk
+++ b/source/torture/local/config.mk
@@ -1,7 +1,7 @@
 #################################
 # Start SUBSYSTEM TORTURE_LOCAL
 [MODULE::TORTURE_LOCAL]
-SUBSYSTEM = torture
+SUBSYSTEM = smbtorture
 INIT_FUNCTION = torture_local_init
 PRIVATE_PROTO_HEADER = \
 		proto.h
diff --git a/source/torture/smb2/config.mk b/source/torture/smb2/config.mk
index f3318bb..4e0cac0 100644
--- a/source/torture/smb2/config.mk
+++ b/source/torture/smb2/config.mk
@@ -2,7 +2,7 @@
 #################################
 # Start SUBSYSTEM TORTURE_SMB2
 [MODULE::TORTURE_SMB2]
-SUBSYSTEM = torture
+SUBSYSTEM = smbtorture
 INIT_FUNCTION = torture_smb2_init
 PRIVATE_PROTO_HEADER = \
 		proto.h
diff --git a/source/torture/torture.c b/source/torture/torture.c
new file mode 100644
index 0000000..54fe0ea
--- /dev/null
+++ b/source/torture/torture.c
@@ -0,0 +1,71 @@
+/* 
+   Unix SMB/CIFS implementation.
+   SMB torture tester
+   Copyright (C) Andrew Tridgell 1997-2003
+   Copyright (C) Jelmer Vernooij 2006
+   
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+   
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+   
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "includes.h"
+#include "system/time.h"
+#include "torture/torture.h"
+#include "lib/util/dlinklist.h"
+#include "param/param.h"
+#include "lib/cmdline/popt_common.h"
+
+_PUBLIC_ int torture_numops=10;
+_PUBLIC_ int torture_entries=1000;
+_PUBLIC_ int torture_failures=1;
+_PUBLIC_ int torture_seed=0;
+_PUBLIC_ int torture_numasync=100;
+
+struct torture_suite *torture_root = NULL;
+
+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);
+}
+
+
+_PUBLIC_ int torture_init(void)
+{
+	extern NTSTATUS torture_base_init(void);
+	extern NTSTATUS torture_ldap_init(void);
+	extern NTSTATUS torture_local_init(void);
+	extern NTSTATUS torture_nbt_init(void);
+	extern NTSTATUS torture_nbench_init(void);
+	extern NTSTATUS torture_rap_init(void);
+	extern NTSTATUS torture_rpc_init(void);
+	extern NTSTATUS torture_smb2_init(void);
+	extern NTSTATUS torture_net_init(void);
+	extern NTSTATUS torture_raw_init(void);
+	extern NTSTATUS torture_unix_init(void);
+	extern NTSTATUS torture_winbind_init(void);
+	init_module_fn static_init[] = { STATIC_smbtorture_MODULES };
+	init_module_fn *shared_init = load_samba_modules(NULL, cmdline_lp_ctx, "torture");
+
+	run_init_functions(static_init);
+	run_init_functions(shared_init);
+
+	talloc_free(shared_init);
+
+	return 0;
+}
diff --git a/source/torture/winbind/config.mk b/source/torture/winbind/config.mk
index 155766a..ee8ff95 100644
--- a/source/torture/winbind/config.mk
+++ b/source/torture/winbind/config.mk
@@ -2,7 +2,7 @@
 #################################
 # Start SUBSYSTEM TORTURE_WINBIND
 [MODULE::TORTURE_WINBIND]
-SUBSYSTEM = torture
+SUBSYSTEM = smbtorture
 INIT_FUNCTION = torture_winbind_init
 PRIVATE_PROTO_HEADER = \
 		proto.h


-- 
Samba Shared Repository


More information about the samba-cvs mailing list