diff options
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/registry/tests/registry.c | 21 | ||||
-rw-r--r-- | source4/lib/replace/test/testsuite.c | 2 |
2 files changed, 22 insertions, 1 deletions
diff --git a/source4/lib/registry/tests/registry.c b/source4/lib/registry/tests/registry.c index 851f74fa3c..0fda7587dc 100644 --- a/source4/lib/registry/tests/registry.c +++ b/source4/lib/registry/tests/registry.c @@ -47,6 +47,22 @@ static bool test_get_predefined(struct torture_context *tctx, } /** + * Test obtaining a predefined key. + */ +static bool test_get_predefined_unknown(struct torture_context *tctx, + const void *_data) +{ + const struct registry_context *rctx = _data; + struct registry_key *root; + WERROR error; + + error = reg_get_predefined_key(rctx, 1337, &root); + torture_assert_werr_equal(tctx, error, WERR_BADFILE, + "getting predefined key failed"); + return true; +} + +/** * Test creating a new subkey */ static bool test_create_subkey(struct torture_context *tctx, @@ -200,6 +216,9 @@ static bool test_flush_key(struct torture_context *tctx, const void *_data) error = reg_key_flush(subkey); torture_assert_werr_ok(tctx, error, "flush key"); + torture_assert_werr_equal(tctx, reg_key_flush(NULL), + WERR_INVALID_PARAM, "flush key"); + return true; } @@ -457,6 +476,8 @@ static void tcase_add_tests(struct torture_tcase *tcase) torture_tcase_add_simple_test(tcase, "list_subkeys", test_list_subkeys); torture_tcase_add_simple_test(tcase, "get_predefined_key", test_get_predefined); + torture_tcase_add_simple_test(tcase, "get_predefined_key", + test_get_predefined_unknown); torture_tcase_add_simple_test(tcase, "create_key", test_create_subkey); torture_tcase_add_simple_test(tcase, "create_key", test_create_nested_subkey); diff --git a/source4/lib/replace/test/testsuite.c b/source4/lib/replace/test/testsuite.c index 8584bcaa66..269a2ff5d6 100644 --- a/source4/lib/replace/test/testsuite.c +++ b/source4/lib/replace/test/testsuite.c @@ -743,7 +743,7 @@ static int test_strtoull(void) TEST_STRTOULL("-02000000000000000000000",8, 18446744073709551615LLU, 24, ERANGE); TEST_STRTOULL("-2000000000000000000000",8, 18446744073709551615LLU, 23, ERANGE); - printf("success: strtuoll\n"); + printf("success: strtoull\n"); return true; } |