summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/registry/tests/registry.c21
-rw-r--r--source4/lib/replace/test/testsuite.c2
-rw-r--r--source4/torture/basic/base.c2
-rw-r--r--source4/torture/raw/lockbench.c3
-rw-r--r--source4/torture/rpc/echo.c1
5 files changed, 27 insertions, 2 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;
}
diff --git a/source4/torture/basic/base.c b/source4/torture/basic/base.c
index 55e970f130..1e03197c28 100644
--- a/source4/torture/basic/base.c
+++ b/source4/torture/basic/base.c
@@ -599,6 +599,8 @@ static BOOL rw_torture2(struct torture_context *tctx,
torture_assert_ntstatus_ok(tctx, smbcli_unlink(c1->tree, lockfname),
talloc_asprintf(tctx, "unlink failed (%s)", smbcli_errstr(c1->tree)));
+ torture_comment(tctx, "\n");
+
return correct;
}
diff --git a/source4/torture/raw/lockbench.c b/source4/torture/raw/lockbench.c
index ce90944b1d..44b60b8695 100644
--- a/source4/torture/raw/lockbench.c
+++ b/source4/torture/raw/lockbench.c
@@ -393,9 +393,10 @@ BOOL torture_bench_lock(struct torture_context *torture)
smbcli_deltree(state[0].tree, BASEDIR);
talloc_free(mem_ctx);
+ printf("\n");
return ret;
failed:
talloc_free(mem_ctx);
- return False;
+ return false;
}
diff --git a/source4/torture/rpc/echo.c b/source4/torture/rpc/echo.c
index 3608f82686..5956ed74a7 100644
--- a/source4/torture/rpc/echo.c
+++ b/source4/torture/rpc/echo.c
@@ -287,6 +287,7 @@ static bool test_sleep(struct torture_context *tctx,
}
}
}
+ printf("\n");
return true;
}