From af1b7f55756b5957e0f4c9e30bfcb6baa0ecaadb Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 29 Dec 2011 16:45:23 +0100 Subject: Remove the 'dir' registry backend. This backend was incomplete, and we already have plenty of other backends. --- source4/lib/registry/tests/hive.c | 39 --------------------------------------- 1 file changed, 39 deletions(-) (limited to 'source4/lib/registry/tests') diff --git a/source4/lib/registry/tests/hive.c b/source4/lib/registry/tests/hive.c index 28d4bbc8e1..c5632b882b 100644 --- a/source4/lib/registry/tests/hive.c +++ b/source4/lib/registry/tests/hive.c @@ -375,30 +375,6 @@ static void tcase_add_tests(struct torture_tcase *tcase) test_hive_security); } -static bool hive_setup_dir(struct torture_context *tctx, void **data) -{ - struct hive_key *key; - WERROR error; - char *dirname; - NTSTATUS status; - - status = torture_temp_dir(tctx, "hive-dir", &dirname); - if (!NT_STATUS_IS_OK(status)) - return false; - - rmdir(dirname); - - error = reg_create_directory(tctx, dirname, &key); - if (!W_ERROR_IS_OK(error)) { - fprintf(stderr, "Unable to initialize dir hive\n"); - return false; - } - - *data = key; - - return true; -} - static bool hive_setup_ldb(struct torture_context *tctx, void **data) { struct hive_key *key; @@ -447,26 +423,11 @@ static bool hive_setup_regf(struct torture_context *tctx, void **data) return true; } -static bool test_dir_refuses_null_location(struct torture_context *tctx) -{ - torture_assert_werr_equal(tctx, WERR_INVALID_PARAM, - reg_open_directory(NULL, NULL, NULL), - "reg_open_directory accepts NULL location"); - return true; -} - struct torture_suite *torture_registry_hive(TALLOC_CTX *mem_ctx) { struct torture_tcase *tcase; struct torture_suite *suite = torture_suite_create(mem_ctx, "hive"); - torture_suite_add_simple_test(suite, "dir-refuses-null-location", - test_dir_refuses_null_location); - - tcase = torture_suite_add_tcase(suite, "dir"); - torture_tcase_set_fixture(tcase, hive_setup_dir, NULL); - tcase_add_tests(tcase); - tcase = torture_suite_add_tcase(suite, "ldb"); torture_tcase_set_fixture(tcase, hive_setup_ldb, NULL); tcase_add_tests(tcase); -- cgit