summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamen.mazdrashki@postpath.com>2009-10-05 18:39:13 +0300
committerAnatoliy Atanasov <anatoliy.atanasov@postpath.com>2009-10-16 12:54:14 +0300
commit6a680cea6a58f4a0d980be8ba47286293ab6f9ab (patch)
tree50f4ec711b2b6be24728b2817ffccc60545aec96
parent40a8a2268454a55103c5c675d6fc07efa3cb6f31 (diff)
downloadsamba-6a680cea6a58f4a0d980be8ba47286293ab6f9ab.tar.gz
samba-6a680cea6a58f4a0d980be8ba47286293ab6f9ab.tar.bz2
samba-6a680cea6a58f4a0d980be8ba47286293ab6f9ab.zip
s4/drs(tort): TORTURE_DRS torture module - initial implementation
Drsuapi tests module registers two suites: - DRS-RPC - tests to be executed against remote machine - DRS-UNIT - unit test for internal testing
-rw-r--r--source4/torture/config.mk4
-rw-r--r--source4/torture/drs/config.mk22
-rw-r--r--source4/torture/drs/drs_init.c68
-rw-r--r--source4/torture/torture.c1
4 files changed, 95 insertions, 0 deletions
diff --git a/source4/torture/config.mk b/source4/torture/config.mk
index b85a0f84b1..00362b6358 100644
--- a/source4/torture/config.mk
+++ b/source4/torture/config.mk
@@ -126,6 +126,10 @@ torture_rpc_OBJ_FILES = $(addprefix $(torturesrcdir)/rpc/, \
$(eval $(call proto_header_template,$(torturesrcdir)/rpc/proto.h,$(torture_rpc_OBJ_FILES:.o=.c)))
#################################
+# RPC/Local DRSUAPI tests
+mkinclude drs/config.mk
+
+#################################
# Start SUBSYSTEM TORTURE_RAP
[MODULE::TORTURE_RAP]
OUTPUT_TYPE = MERGED_OBJ
diff --git a/source4/torture/drs/config.mk b/source4/torture/drs/config.mk
new file mode 100644
index 0000000000..1044541c8a
--- /dev/null
+++ b/source4/torture/drs/config.mk
@@ -0,0 +1,22 @@
+#################################
+# Start SUBSYSTEM TORTURE_DRS
+[MODULE::TORTURE_DRS]
+SUBSYSTEM = smbtorture
+OUTPUT_TYPE = MERGED_OBJ
+INIT_FUNCTION = torture_drs_init
+PRIVATE_DEPENDENCIES = \
+ NDR_TABLE RPC_NDR_UNIXINFO dcerpc_samr RPC_NDR_WINREG RPC_NDR_INITSHUTDOWN \
+ RPC_NDR_OXIDRESOLVER RPC_NDR_EVENTLOG RPC_NDR_ECHO RPC_NDR_SVCCTL \
+ RPC_NDR_NETLOGON dcerpc_atsvc dcerpc_mgmt RPC_NDR_DRSUAPI \
+ RPC_NDR_LSA RPC_NDR_EPMAPPER RPC_NDR_DFS RPC_NDR_FRSAPI RPC_NDR_SPOOLSS \
+ RPC_NDR_SRVSVC RPC_NDR_WKSSVC RPC_NDR_ROT RPC_NDR_DSSETUP \
+ RPC_NDR_REMACT RPC_NDR_OXIDRESOLVER RPC_NDR_NTSVCS WB_HELPER LIBSAMBA-NET \
+ LIBCLI_AUTH POPT_CREDENTIALS TORTURE_LDAP TORTURE_UTIL TORTURE_RAP \
+ dcerpc_server service process_model ntvfs SERVICE_SMB RPC_NDR_BROWSER LIBCLI_DRSUAPI TORTURE_LDB_MODULE
+# End SUBSYSTEM TORTURE_DRS
+#################################
+
+TORTURE_DRS_OBJ_FILES = \
+ $(torturesrcdir)/drs/drs_init.o
+
+$(eval $(call proto_header_template,$(torturesrcdir)/drs/proto.h,$(TORTURE_DRS_OBJ_FILES:.o=.c)))
diff --git a/source4/torture/drs/drs_init.c b/source4/torture/drs/drs_init.c
new file mode 100644
index 0000000000..f26a66818a
--- /dev/null
+++ b/source4/torture/drs/drs_init.c
@@ -0,0 +1,68 @@
+/*
+ Unix SMB/CIFS implementation.
+
+ DRSUAPI utility functions to be used in torture tests
+
+ Copyright (C) Kamen Mazdrashki <kamen.mazdrashki@postpath.com> 2009
+
+ 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 "torture/smbtorture.h"
+#include "torture/drs/proto.h"
+
+/**
+ * DRSUAPI tests to be executed remotely
+ */
+static struct torture_suite * torture_drs_rpc_suite(TALLOC_CTX *mem_ctx)
+{
+ struct torture_suite *suite = torture_suite_create(
+ talloc_autofree_context(),
+ "RPC");
+
+ return suite;
+}
+
+/**
+ * DRSUAPI tests to be executed remotely
+ */
+static struct torture_suite * torture_drs_unit_suite(TALLOC_CTX *mem_ctx)
+{
+ struct torture_suite *suite = torture_suite_create(
+ talloc_autofree_context(),
+ "UNIT");
+
+ return suite;
+}
+
+/**
+ * DRSUAPI torture module initialization
+ */
+NTSTATUS torture_drs_init(void)
+{
+ struct torture_suite *suite = torture_suite_create(
+ talloc_autofree_context(),
+ "DRS");
+
+ torture_suite_add_suite(suite, torture_drs_rpc_suite(suite));
+ torture_suite_add_suite(suite, torture_drs_unit_suite(suite));
+
+ suite->description = talloc_strdup(suite,
+ "DRSUAPI related tests - Remote and Local");
+
+ torture_register_suite(suite);
+
+ return NT_STATUS_OK;
+}
diff --git a/source4/torture/torture.c b/source4/torture/torture.c
index 39a8005e86..774681dac3 100644
--- a/source4/torture/torture.c
+++ b/source4/torture/torture.c
@@ -68,6 +68,7 @@ _PUBLIC_ int torture_init(void)
extern NTSTATUS torture_raw_init(void);
extern NTSTATUS torture_unix_init(void);
extern NTSTATUS torture_winbind_init(void);
+ extern NTSTATUS torture_drs_init(void);
init_module_fn static_init[] = { STATIC_smbtorture_MODULES };
init_module_fn *shared_init = load_samba_modules(NULL, cmdline_lp_ctx, "smbtorture");