[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha2-855-g1269758

Jelmer Vernooij jelmer at samba.org
Fri Feb 15 14:54:59 GMT 2008


The branch, v4-0-test has been updated
       via  1269758e95686cc155284d5d56080e1be11bbd75 (commit)
      from  2da0734f439ee5f4e3eb1c9416e7df4450f08534 (commit)

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


- Log -----------------------------------------------------------------
commit 1269758e95686cc155284d5d56080e1be11bbd75
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Fri Feb 15 15:53:06 2008 +0100

    Reconcile header files for torture utility functions.

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

Summary of changes:
 source/torture/config.mk                |    1 -
 source/torture/libnet/libnet_BecomeDC.c |    2 +-
 source/torture/local/torture.c          |    2 +-
 source/torture/util.h                   |  120 +++++++++++++++++++++++++++++++
 source/torture/util_provision.c         |    2 +-
 source/torture/util_provision.h         |   51 -------------
 6 files changed, 123 insertions(+), 55 deletions(-)
 create mode 100644 source/torture/util.h
 delete mode 100644 source/torture/util_provision.h


Changeset truncated at 500 lines:

diff --git a/source/torture/config.mk b/source/torture/config.mk
index 5a3e3d0..7ab4658 100644
--- a/source/torture/config.mk
+++ b/source/torture/config.mk
@@ -16,7 +16,6 @@ PUBLIC_DEPENDENCIES = \
 [SUBSYSTEM::TORTURE_UTIL]
 OBJ_FILES = util_smb.o util_provision.o
 PRIVATE_DEPENDENCIES = LIBCLI_RAW LIBPYTHON smbcalls
-PUBLIC_PROTO_HEADER = util.h
 PUBLIC_DEPENDENCIES = POPT_CREDENTIALS
 
 #################################
diff --git a/source/torture/libnet/libnet_BecomeDC.c b/source/torture/libnet/libnet_BecomeDC.c
index 13e1aec..9566f5e 100644
--- a/source/torture/libnet/libnet_BecomeDC.c
+++ b/source/torture/libnet/libnet_BecomeDC.c
@@ -37,7 +37,7 @@
 #include "lib/ldb_wrap.h"
 #include "auth/auth.h"
 #include "param/param.h"
-#include "torture/util_provision.h"
+#include "torture/util.h"
 
 struct test_become_dc_state {
 	struct libnet_context *ctx;
diff --git a/source/torture/local/torture.c b/source/torture/local/torture.c
index 0c9931b..3273015 100644
--- a/source/torture/local/torture.c
+++ b/source/torture/local/torture.c
@@ -24,7 +24,7 @@
 #include "system/wait.h"
 #include "lib/events/events.h"
 #include "libcli/raw/libcliraw.h"
-#include "torture/util_provision.h"
+#include "torture/util.h"
 
 static bool test_tempdir(struct torture_context *tctx)
 {
diff --git a/source/torture/util.h b/source/torture/util.h
new file mode 100644
index 0000000..c5219a5
--- /dev/null
+++ b/source/torture/util.h
@@ -0,0 +1,120 @@
+/* 
+   Unix SMB/CIFS implementation.
+   Samba utility functions
+   Copyright (C) Jelmer Vernooij <jelmer at samba.org> 2008
+   
+   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/>.
+*/
+
+#ifndef _TORTURE_PROVISION_H_
+#define _TORTURE_PROVISION_H_
+
+struct provision_settings {
+	const char *dns_name;
+	const char *site_name;
+	const char *root_dn_str; 
+	const char *domain_dn_str;
+	const char *config_dn_str;
+	const char *schema_dn_str;
+	const struct GUID *invocation_id;
+	const char *netbios_name;
+	const char *realm;
+	const char *domain;
+	const struct GUID *ntds_guid;
+	const char *ntds_dn_str;
+	const char *machine_password;
+	const char *samdb_ldb;
+	const char *secrets_ldb;
+	const char *secrets_keytab;
+	const char *schemadn_ldb;
+	const char *configdn_ldb;
+	const char *domaindn_ldb;
+	const char *templates_ldb;
+	const char *dns_keytab;
+};
+
+NTSTATUS provision_bare(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx,
+						struct provision_settings *settings);
+
+
+/**
+  setup a directory ready for a test
+*/
+_PUBLIC_ bool torture_setup_dir(struct smbcli_state *cli, const char *dname);
+NTSTATUS create_directory_handle(struct smbcli_tree *tree, const char *dname, int *fnum);
+
+/**
+  sometimes we need a fairly complex file to work with, so we can test
+  all possible attributes. 
+*/
+_PUBLIC_ int create_complex_file(struct smbcli_state *cli, TALLOC_CTX *mem_ctx, const char *fname);
+int create_complex_dir(struct smbcli_state *cli, TALLOC_CTX *mem_ctx, const char *dname);
+void *shm_setup(int size);
+
+/**
+  check that a wire string matches the flags specified 
+  not 100% accurate, but close enough for testing
+*/
+bool wire_bad_flags(struct smb_wire_string *str, int flags, 
+		    struct smbcli_transport *transport);
+void dump_all_info(TALLOC_CTX *mem_ctx, union smb_fileinfo *finfo);
+void torture_all_info(struct smbcli_tree *tree, const char *fname);
+bool torture_set_file_attribute(struct smbcli_tree *tree, const char *fname, uint16_t attrib);
+NTSTATUS torture_set_sparse(struct smbcli_tree *tree, int fnum);
+NTSTATUS torture_check_ea(struct smbcli_state *cli, 
+			  const char *fname, const char *eaname, const char *value);
+_PUBLIC_ bool torture_open_connection_share(TALLOC_CTX *mem_ctx,
+				   struct smbcli_state **c, 
+				   struct torture_context *tctx,
+				   const char *hostname, 
+				   const char *sharename,
+				   struct event_context *ev);
+_PUBLIC_ bool torture_get_conn_index(int conn_index,
+				     TALLOC_CTX *mem_ctx,
+				     struct torture_context *tctx,
+				     char **host, char **share);
+_PUBLIC_ bool torture_open_connection_ev(struct smbcli_state **c,
+					 int conn_index,
+					 struct torture_context *tctx,
+					 struct event_context *ev);
+_PUBLIC_ bool torture_open_connection(struct smbcli_state **c, struct torture_context *tctx, int conn_index);
+_PUBLIC_ bool torture_close_connection(struct smbcli_state *c);
+_PUBLIC_ bool check_error(const char *location, struct smbcli_state *c, 
+		 uint8_t eclass, uint32_t ecode, NTSTATUS nterr);
+double torture_create_procs(struct torture_context *tctx, 
+							bool (*fn)(struct torture_context *, struct smbcli_state *, int), bool *result);
+_PUBLIC_ struct torture_test *torture_suite_add_smb_multi_test(
+									struct torture_suite *suite,
+									const char *name,
+									bool (*run) (struct torture_context *,
+												 struct smbcli_state *,
+												int i));
+_PUBLIC_ struct torture_test *torture_suite_add_2smb_test(
+									struct torture_suite *suite,
+									const char *name,
+									bool (*run) (struct torture_context *,
+												struct smbcli_state *,
+												struct smbcli_state *));
+_PUBLIC_ struct torture_test *torture_suite_add_1smb_test(
+				struct torture_suite *suite,
+				const char *name,
+				bool (*run) (struct torture_context *, struct smbcli_state *));
+NTSTATUS torture_second_tcon(TALLOC_CTX *mem_ctx,
+			     struct smbcli_session *session,
+			     const char *sharename,
+			     struct smbcli_tree **res);
+
+
+
+#endif /* _TORTURE_PROVISION_H_ */
diff --git a/source/torture/util_provision.c b/source/torture/util_provision.c
index a5c564b..2a1e925 100644
--- a/source/torture/util_provision.c
+++ b/source/torture/util_provision.c
@@ -24,7 +24,7 @@
 #include "scripting/ejs/smbcalls.h"
 #include "auth/auth.h"
 #include "lib/ldb_wrap.h"
-#include "torture/util_provision.h"
+#include "torture/util.h"
 
 static EjsId eid;
 static int ejs_error;
diff --git a/source/torture/util_provision.h b/source/torture/util_provision.h
deleted file mode 100644
index 2846708..0000000
--- a/source/torture/util_provision.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
-   Samba utility functions
-   Copyright (C) Jelmer Vernooij <jelmer at samba.org> 2008
-   
-   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/>.
-*/
-
-#ifndef _TORTURE_PROVISION_H_
-#define _TORTURE_PROVISION_H_
-
-struct provision_settings {
-	const char *dns_name;
-	const char *site_name;
-	const char *root_dn_str; 
-	const char *domain_dn_str;
-	const char *config_dn_str;
-	const char *schema_dn_str;
-	const struct GUID *invocation_id;
-	const char *netbios_name;
-	const char *realm;
-	const char *domain;
-	const struct GUID *ntds_guid;
-	const char *ntds_dn_str;
-	const char *machine_password;
-	const char *samdb_ldb;
-	const char *secrets_ldb;
-	const char *secrets_keytab;
-	const char *schemadn_ldb;
-	const char *configdn_ldb;
-	const char *domaindn_ldb;
-	const char *templates_ldb;
-	const char *dns_keytab;
-};
-
-NTSTATUS provision_bare(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx,
-						struct provision_settings *settings);
-
-
-#endif /* _TORTURE_PROVISION_H_ */


-- 
Samba Shared Repository


More information about the samba-cvs mailing list