Author: tpot
Date: 2005-10-20 06:31:51 +0000 (Thu, 20 Oct 2005)
New Revision: 11210

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=11210

Log:
Log registry open function name when starting hive tests.

Modified:
   branches/SAMBA_4_0/source/torture/rpc/winreg.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/rpc/winreg.c
===================================================================
--- branches/SAMBA_4_0/source/torture/rpc/winreg.c      2005-10-20 05:09:58 UTC 
(rev 11209)
+++ branches/SAMBA_4_0/source/torture/rpc/winreg.c      2005-10-20 06:31:51 UTC 
(rev 11210)
@@ -686,13 +686,16 @@
 
 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 @@
        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 @@
        }
 
        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;
        }
 

Reply via email to