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 +++----- 2 files changed, 5 insertions(+), 8 deletions(-) (limited to 'source4/lib/registry') 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; } -- cgit