diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-05-23 16:24:07 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-05-23 16:24:07 +0200 |
commit | cceac63aaab26a72e2f3fd150dd1e4e83a0e5279 (patch) | |
tree | 6203cca724fc5f17f068e3fd4d0b403fdff3f8f9 /source4/torture/local | |
parent | 7c7880695b02df4cbe0faab959846c63d0cc0536 (diff) | |
parent | 72fce654072b2d7317ff21c95558bd365701d5dd (diff) | |
download | samba-cceac63aaab26a72e2f3fd150dd1e4e83a0e5279.tar.gz samba-cceac63aaab26a72e2f3fd150dd1e4e83a0e5279.tar.bz2 samba-cceac63aaab26a72e2f3fd150dd1e4e83a0e5279.zip |
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-wsgi
Conflicts:
source/scripting/python/samba/provision.py
(This used to be commit d27de633656f8a699222df77c4c58326890889a2)
Diffstat (limited to 'source4/torture/local')
-rw-r--r-- | source4/torture/local/config.mk | 66 | ||||
-rw-r--r-- | source4/torture/local/dbspeed.c | 4 | ||||
-rw-r--r-- | source4/torture/local/local.c | 2 | ||||
-rw-r--r-- | source4/torture/local/torture.c | 41 |
4 files changed, 60 insertions, 53 deletions
diff --git a/source4/torture/local/config.mk b/source4/torture/local/config.mk index 4143d415cf..cd1c7b1422 100644 --- a/source4/torture/local/config.mk +++ b/source4/torture/local/config.mk @@ -1,39 +1,8 @@ ################################# # Start SUBSYSTEM TORTURE_LOCAL [MODULE::TORTURE_LOCAL] -SUBSYSTEM = torture +SUBSYSTEM = smbtorture INIT_FUNCTION = torture_local_init -PRIVATE_PROTO_HEADER = \ - proto.h -OBJ_FILES = \ - ../../lib/charset/tests/iconv.o \ - ../../lib/talloc/testsuite.o \ - ../../lib/replace/test/getifaddrs.o \ - ../../lib/replace/test/os2_delete.o \ - ../../lib/replace/test/strptime.o \ - ../../lib/replace/test/testsuite.o \ - ../../lib/messaging/tests/messaging.o \ - ../../lib/messaging/tests/irpc.o \ - ../../librpc/tests/binding_string.o \ - ../../lib/util/tests/idtree.o \ - ../../lib/socket/testsuite.o \ - ../../lib/socket_wrapper/testsuite.o \ - ../../libcli/resolve/testsuite.o \ - ../../lib/util/tests/strlist.o \ - ../../lib/util/tests/str.o \ - ../../lib/util/tests/file.o \ - ../../lib/util/tests/genrand.o \ - ../../lib/compression/testsuite.o \ - ../../lib/charset/tests/charset.o \ - ../../libcli/security/tests/sddl.o \ - ../../lib/tdr/testsuite.o \ - ../../lib/events/testsuite.o \ - ../../param/tests/share.o \ - ../../param/tests/loadparm.o \ - ../../auth/credentials/tests/simple.o \ - local.o \ - dbspeed.o \ - torture.o PRIVATE_DEPENDENCIES = \ RPC_NDR_ECHO \ TDR \ @@ -48,3 +17,36 @@ PRIVATE_DEPENDENCIES = \ torture_registry # End SUBSYSTEM TORTURE_LOCAL ################################# + +TORTURE_LOCAL_OBJ_FILES = \ + $(torturesrcdir)/../lib/charset/tests/iconv.o \ + $(torturesrcdir)/../lib/talloc/testsuite.o \ + $(torturesrcdir)/../lib/replace/test/getifaddrs.o \ + $(torturesrcdir)/../lib/replace/test/os2_delete.o \ + $(torturesrcdir)/../lib/replace/test/strptime.o \ + $(torturesrcdir)/../lib/replace/test/testsuite.o \ + $(torturesrcdir)/../lib/messaging/tests/messaging.o \ + $(torturesrcdir)/../lib/messaging/tests/irpc.o \ + $(torturesrcdir)/../librpc/tests/binding_string.o \ + $(torturesrcdir)/../lib/util/tests/idtree.o \ + $(torturesrcdir)/../lib/socket/testsuite.o \ + $(torturesrcdir)/../lib/socket_wrapper/testsuite.o \ + $(torturesrcdir)/../libcli/resolve/testsuite.o \ + $(torturesrcdir)/../lib/util/tests/strlist.o \ + $(torturesrcdir)/../lib/util/tests/str.o \ + $(torturesrcdir)/../lib/util/tests/file.o \ + $(torturesrcdir)/../lib/util/tests/genrand.o \ + $(torturesrcdir)/../lib/compression/testsuite.o \ + $(torturesrcdir)/../lib/charset/tests/charset.o \ + $(torturesrcdir)/../libcli/security/tests/sddl.o \ + $(torturesrcdir)/../lib/tdr/testsuite.o \ + $(torturesrcdir)/../lib/events/testsuite.o \ + $(torturesrcdir)/../param/tests/share.o \ + $(torturesrcdir)/../param/tests/loadparm.o \ + $(torturesrcdir)/../auth/credentials/tests/simple.o \ + $(torturesrcdir)/local/local.o \ + $(torturesrcdir)/local/dbspeed.o \ + $(torturesrcdir)/local/torture.o + + +$(eval $(call proto_header_template,$(torturesrcdir)/local/proto.h,$(TORTURE_LOCAL_OBJ_FILES:.o=.c))) diff --git a/source4/torture/local/dbspeed.c b/source4/torture/local/dbspeed.c index 34083cd204..017c8568f4 100644 --- a/source4/torture/local/dbspeed.c +++ b/source4/torture/local/dbspeed.c @@ -26,7 +26,7 @@ #include "lib/ldb/include/ldb_errors.h" #include "lib/ldb_wrap.h" #include "lib/tdb_wrap.h" -#include "torture/torture.h" +#include "torture/smbtorture.h" #include "param/param.h" float tdb_speed; @@ -176,7 +176,7 @@ static bool test_ldb_speed(struct torture_context *torture, const void *_data) torture_comment(torture, "Testing ldb speed for sidmap\n"); - ldb = ldb_wrap_connect(tmp_ctx, torture->lp_ctx, "tdb://test.ldb", + ldb = ldb_wrap_connect(tmp_ctx, torture->ev, torture->lp_ctx, "tdb://test.ldb", NULL, NULL, LDB_FLG_NOSYNC, NULL); if (!ldb) { unlink("./test.ldb"); diff --git a/source4/torture/local/local.c b/source4/torture/local/local.c index e4dfadd3d1..1c3274adcd 100644 --- a/source4/torture/local/local.c +++ b/source4/torture/local/local.c @@ -18,7 +18,7 @@ */ #include "includes.h" -#include "torture/torture.h" +#include "torture/smbtorture.h" #include "torture/local/proto.h" #include "torture/ndr/ndr.h" #include "torture/ndr/proto.h" diff --git a/source4/torture/local/torture.c b/source4/torture/local/torture.c index bb6e21ed4f..7935f6cc35 100644 --- a/source4/torture/local/torture.c +++ b/source4/torture/local/torture.c @@ -25,6 +25,7 @@ #include "lib/events/events.h" #include "libcli/raw/libcliraw.h" #include "torture/util.h" +#include "param/provision.h" static bool test_tempdir(struct torture_context *tctx) { @@ -42,30 +43,34 @@ static bool test_tempdir(struct torture_context *tctx) static bool test_provision(struct torture_context *tctx) { NTSTATUS status; - struct provision_settings settings; - char *location = NULL; - torture_assert_ntstatus_ok(tctx, torture_temp_dir(tctx, "torture_provision", &location), + struct provision_settings *settings = talloc_zero(tctx, struct provision_settings); + struct provision_result result; + char *targetdir = NULL; + + torture_assert_ntstatus_ok(tctx, torture_temp_dir(tctx, "torture_provision", &targetdir), "torture_temp_dir should return NT_STATUS_OK" ); + settings->targetdir = talloc_steal(settings, targetdir); - settings.dns_name = "example.com"; - settings.site_name = "SOME-SITE-NAME"; - settings.root_dn_str = "DC=EXAMPLE,DC=COM"; - settings.domain_dn_str = "DC=EXAMPLE,DC=COM"; - settings.config_dn_str = NULL; - settings.schema_dn_str = NULL; - settings.invocation_id = NULL; - settings.netbios_name = "FOO"; - settings.realm = "EXAMPLE.COM"; - settings.domain = "EXAMPLE"; - settings.ntds_guid = NULL; - settings.ntds_dn_str = NULL; - settings.machine_password = "geheim"; - settings.targetdir = location; + settings->site_name = "SOME-SITE-NAME"; + settings->root_dn_str = "DC=EXAMPLE,DC=COM"; + settings->domain_dn_str = "DC=EXAMPLE,DC=COM"; + settings->config_dn_str = NULL; + settings->schema_dn_str = NULL; + settings->invocation_id = NULL; + settings->netbios_name = "FOO"; + settings->realm = "EXAMPLE.COM"; + settings->domain = "EXAMPLE"; + settings->netbios_name = "torture"; + settings->ntds_dn_str = NULL; + settings->machine_password = "geheim"; - status = provision_bare(tctx, tctx->lp_ctx, &settings); + status = provision_bare(settings, tctx->lp_ctx, settings, &result); torture_assert_ntstatus_ok(tctx, status, "provision"); + torture_assert_str_equal(tctx, result.domaindn, "DC=EXAMPLE,DC=COM", + "domaindn incorrect"); + return true; } |