From 6a680cea6a58f4a0d980be8ba47286293ab6f9ab Mon Sep 17 00:00:00 2001 From: Kamen Mazdrashki Date: Mon, 5 Oct 2009 18:39:13 +0300 Subject: 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 --- source4/torture/drs/config.mk | 22 ++++++++++++++ source4/torture/drs/drs_init.c | 68 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 source4/torture/drs/config.mk create mode 100644 source4/torture/drs/drs_init.c (limited to 'source4/torture/drs') 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 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 . +*/ + +#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; +} -- cgit