summaryrefslogtreecommitdiff
path: root/source4/lib/registry
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-11-11 23:36:53 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:45:06 +0100
commitdbc78e20169c97f2592ddb18fdf48a1c91a3f77d (patch)
tree8ef895da9d2f8edbdba9988a1e220bfa03163c79 /source4/lib/registry
parent6ee570c327a210a065823b308a7badfff6239a5f (diff)
downloadsamba-dbc78e20169c97f2592ddb18fdf48a1c91a3f77d.tar.gz
samba-dbc78e20169c97f2592ddb18fdf48a1c91a3f77d.tar.bz2
samba-dbc78e20169c97f2592ddb18fdf48a1c91a3f77d.zip
r25928: Split up torture-local a bit.
(This used to be commit c6b109040856ba0f1ae0db2787cc838ff61df767)
Diffstat (limited to 'source4/lib/registry')
-rw-r--r--source4/lib/registry/config.mk10
-rw-r--r--source4/lib/registry/tests/generic.c16
2 files changed, 18 insertions, 8 deletions
diff --git a/source4/lib/registry/config.mk b/source4/lib/registry/config.mk
index 670410ff6a..6e8f8917d4 100644
--- a/source4/lib/registry/config.mk
+++ b/source4/lib/registry/config.mk
@@ -91,3 +91,13 @@ PRIVATE_DEPENDENCIES = \
MANPAGE = man/regtree.1
# End BINARY regtree
################################################
+
+[MODULE::TORTURE_REGISTRY]
+SUBSYSTEM = torture
+INIT_FUNCTION = torture_registry_init
+PRIVATE_DEPENDENCIES = registry
+OBJ_FILES = \
+ tests/generic.o \
+ tests/hive.o \
+ tests/diff.o \
+ tests/registry.o
diff --git a/source4/lib/registry/tests/generic.c b/source4/lib/registry/tests/generic.c
index 1b680f20b7..69146186dc 100644
--- a/source4/lib/registry/tests/generic.c
+++ b/source4/lib/registry/tests/generic.c
@@ -112,11 +112,9 @@ static bool test_reg_val_description_nullname(struct torture_context *ctx)
return true;
}
-
-
-struct torture_suite *torture_registry(TALLOC_CTX *mem_ctx)
+_PUBLIC_ NTSTATUS torture_registry_init(void)
{
- struct torture_suite *suite = torture_suite_create(mem_ctx, "REGISTRY");
+ struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "REGISTRY");
torture_suite_add_simple_test(suite, "str_regtype",
test_str_regtype);
torture_suite_add_simple_test(suite, "reg_val_data_string dword",
@@ -132,9 +130,11 @@ struct torture_suite *torture_registry(TALLOC_CTX *mem_ctx)
torture_suite_add_simple_test(suite, "reg_val_description null",
test_reg_val_description_nullname);
- torture_suite_add_suite(suite, torture_registry_hive(mem_ctx));
- torture_suite_add_suite(suite, torture_registry_registry(mem_ctx));
- torture_suite_add_suite(suite, torture_registry_diff(mem_ctx));
+ torture_suite_add_suite(suite, torture_registry_hive(suite));
+ torture_suite_add_suite(suite, torture_registry_registry(suite));
+ torture_suite_add_suite(suite, torture_registry_diff(suite));
- return suite;
+ torture_register_suite(suite);
+
+ return NT_STATUS_OK;
}