s4-torture: pass down resource name down to clusapi_OpenResource.
authorGünther Deschner <gd@samba.org>
Thu, 5 Mar 2015 15:39:37 +0000 (16:39 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 13 Mar 2015 11:05:11 +0000 (12:05 +0100)
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source4/torture/rpc/clusapi.c

index 25bf420476ecf5208b080975c0a3b8116df5dcaf..6ceb5e86e47c5eb2c275898b25c41a5109ba7995 100644 (file)
@@ -283,11 +283,11 @@ static bool test_SetQuorumResource(struct torture_context *tctx,
 
 static bool test_OpenResource_int(struct torture_context *tctx,
                                  struct dcerpc_pipe *p,
+                                 const char *lpszResourceName,
                                  struct policy_handle *hResource)
 {
        struct dcerpc_binding_handle *b = p->binding_handle;
        struct clusapi_OpenResource r;
-       const char *lpszResourceName = "Cluster Name";
        WERROR Status;
        WERROR rpc_status;
 
@@ -334,7 +334,7 @@ static bool test_OpenResource(struct torture_context *tctx,
 {
        struct policy_handle hResource;
 
-       if (!test_OpenResource_int(tctx, p, &hResource)) {
+       if (!test_OpenResource_int(tctx, p, "Cluster Name", &hResource)) {
                return false;
        }
 
@@ -348,7 +348,7 @@ static bool test_CloseResource(struct torture_context *tctx,
 {
        struct policy_handle hResource;
 
-       if (!test_OpenResource_int(tctx, p, &hResource)) {
+       if (!test_OpenResource_int(tctx, p, "Cluster Name", &hResource)) {
                return false;
        }
 
@@ -517,7 +517,7 @@ static bool test_GetResourceState(struct torture_context *tctx,
        struct policy_handle hResource;
        bool ret = true;
 
-       if (!test_OpenResource_int(tctx, p, &hResource)) {
+       if (!test_OpenResource_int(tctx, p, "Cluster Name", &hResource)) {
                return false;
        }
 
@@ -557,7 +557,7 @@ static bool test_GetResourceId(struct torture_context *tctx,
        struct policy_handle hResource;
        bool ret = true;
 
-       if (!test_OpenResource_int(tctx, p, &hResource)) {
+       if (!test_OpenResource_int(tctx, p, "Cluster Name", &hResource)) {
                return false;
        }
 
@@ -597,7 +597,7 @@ static bool test_GetResourceType(struct torture_context *tctx,
        struct policy_handle hResource;
        bool ret = true;
 
-       if (!test_OpenResource_int(tctx, p, &hResource)) {
+       if (!test_OpenResource_int(tctx, p, "Cluster Name", &hResource)) {
                return false;
        }
 
@@ -635,7 +635,7 @@ static bool test_FailResource(struct torture_context *tctx,
        struct policy_handle hResource;
        bool ret = true;
 
-       if (!test_OpenResource_int(tctx, p, &hResource)) {
+       if (!test_OpenResource_int(tctx, p, "Cluster Name", &hResource)) {
                return false;
        }
 
@@ -673,7 +673,7 @@ static bool test_OnlineResource(struct torture_context *tctx,
        struct policy_handle hResource;
        bool ret = true;
 
-       if (!test_OpenResource_int(tctx, p, &hResource)) {
+       if (!test_OpenResource_int(tctx, p, "Cluster Name", &hResource)) {
                return false;
        }
 
@@ -711,7 +711,7 @@ static bool test_OfflineResource(struct torture_context *tctx,
        struct policy_handle hResource;
        bool ret = true;
 
-       if (!test_OpenResource_int(tctx, p, &hResource)) {
+       if (!test_OpenResource_int(tctx, p, "Cluster Name", &hResource)) {
                return false;
        }
 
@@ -733,7 +733,7 @@ static bool test_CreateResEnum(struct torture_context *tctx,
        WERROR rpc_status;
 
        torture_assert(tctx,
-               test_OpenResource_int(tctx, p, &hResource),
+               test_OpenResource_int(tctx, p, "Cluster Name", &hResource),
                "OpenResource failed");
 
        r.in.hResource = hResource;