From 20685ca815336e64fd5f7e0681c443951d9dcbf2 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 20 Oct 2005 06:31:51 +0000 Subject: r11210: Log registry open function name when starting hive tests. (This used to be commit 3416a6d78f205f9d3fd73161cbed6dcd9c2bfdf8) --- source4/torture/rpc/winreg.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c index bf183ee972..a784337fb9 100644 --- a/source4/torture/rpc/winreg.c +++ b/source4/torture/rpc/winreg.c @@ -686,13 +686,16 @@ static BOOL test_key(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, typedef NTSTATUS (*winreg_open_fn)(struct dcerpc_pipe *, TALLOC_CTX *, void *); -static BOOL test_Open(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, winreg_open_fn open_fn) +static BOOL test_Open(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, + const char *name, winreg_open_fn open_fn) { struct policy_handle handle, newhandle; BOOL ret = True, created = False, deleted = False; struct winreg_OpenHKLM r; NTSTATUS status; + printf("Testing %s\n", name); + r.in.system_name = 0; r.in.access_required = SEC_FLAG_MAXIMUM_ALLOWED; r.out.handle = &handle; @@ -791,10 +794,13 @@ BOOL torture_rpc_winreg(void) struct dcerpc_pipe *p; TALLOC_CTX *mem_ctx; BOOL ret = True; - winreg_open_fn open_fns[] = { (winreg_open_fn)dcerpc_winreg_OpenHKLM, - (winreg_open_fn)dcerpc_winreg_OpenHKU, - (winreg_open_fn)dcerpc_winreg_OpenHKCR, - (winreg_open_fn)dcerpc_winreg_OpenHKCU }; + struct { + const char *name; + winreg_open_fn fn; + } open_fns[] = {{"OpenHKLM", (winreg_open_fn)dcerpc_winreg_OpenHKLM }, + {"OpenHKU", (winreg_open_fn)dcerpc_winreg_OpenHKU }, + {"OpenHKCR", (winreg_open_fn)dcerpc_winreg_OpenHKCR }, + {"OpenHKCU", (winreg_open_fn)dcerpc_winreg_OpenHKCU }}; int i; mem_ctx = talloc_init("torture_rpc_winreg"); @@ -819,7 +825,7 @@ BOOL torture_rpc_winreg(void) } for (i = 0; i < ARRAY_SIZE(open_fns); i++) { - if (!test_Open(p, mem_ctx, open_fns[i])) + if (!test_Open(p, mem_ctx, open_fns[i].name, open_fns[i].fn)) ret = False; } -- cgit