From 81ad27b3096af61f792dc9bd8983a86161f0f30b Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 13 Nov 2007 04:57:09 +0100 Subject: r25935: Fix registry tests. (This used to be commit b311094714b4d51ea7ea756df1aecba169dc0d45) --- source4/lib/registry/config.mk | 5 ++--- source4/lib/registry/tests/generic.c | 8 +++----- source4/torture/local/config.mk | 3 ++- source4/torture/local/local.c | 2 ++ 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'source4') diff --git a/source4/lib/registry/config.mk b/source4/lib/registry/config.mk index 6e8f8917d4..58ee6deb51 100644 --- a/source4/lib/registry/config.mk +++ b/source4/lib/registry/config.mk @@ -92,10 +92,9 @@ MANPAGE = man/regtree.1 # End BINARY regtree ################################################ -[MODULE::TORTURE_REGISTRY] -SUBSYSTEM = torture -INIT_FUNCTION = torture_registry_init +[SUBSYSTEM::torture_registry] PRIVATE_DEPENDENCIES = registry +PRIVATE_PROTO_HEADER = tests/proto.h OBJ_FILES = \ tests/generic.o \ tests/hive.o \ diff --git a/source4/lib/registry/tests/generic.c b/source4/lib/registry/tests/generic.c index d18d300423..13e27cd80b 100644 --- a/source4/lib/registry/tests/generic.c +++ b/source4/lib/registry/tests/generic.c @@ -111,9 +111,9 @@ static bool test_reg_val_description_nullname(struct torture_context *ctx) return true; } -_PUBLIC_ NTSTATUS torture_registry_init(void) +_PUBLIC_ struct torture_suite *torture_registry(TALLOC_CTX *mem_ctx) { - struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "LOCAL-REGISTRY"); + struct torture_suite *suite = torture_suite_create(mem_ctx, "REGISTRY"); torture_suite_add_simple_test(suite, "str_regtype", test_str_regtype); torture_suite_add_simple_test(suite, "reg_val_data_string dword", @@ -133,7 +133,5 @@ _PUBLIC_ NTSTATUS torture_registry_init(void) torture_suite_add_suite(suite, torture_registry_registry(suite)); torture_suite_add_suite(suite, torture_registry_diff(suite)); - torture_register_suite(suite); - - return NT_STATUS_OK; + return suite; } diff --git a/source4/torture/local/config.mk b/source4/torture/local/config.mk index d6414670bf..333947b507 100644 --- a/source4/torture/local/config.mk +++ b/source4/torture/local/config.mk @@ -41,6 +41,7 @@ PRIVATE_DEPENDENCIES = \ TORTURE_AUTH \ TORTURE_UTIL \ TORTURE_NDR \ - share + share \ + torture_registry # End SUBSYSTEM TORTURE_LOCAL ################################# diff --git a/source4/torture/local/local.c b/source4/torture/local/local.c index 432575c990..5f22177826 100644 --- a/source4/torture/local/local.c +++ b/source4/torture/local/local.c @@ -24,6 +24,7 @@ #include "torture/ndr/proto.h" #include "torture/auth/proto.h" #include "lib/crypto/test_proto.h" +#include "lib/registry/tests/proto.h" /* ignore me */ static struct torture_suite * (*suite_generators[]) (TALLOC_CTX *mem_ctx) = @@ -51,6 +52,7 @@ torture_local_event, torture_local_torture, torture_local_dbspeed, + torture_registry, NULL }; -- cgit