Skip to content

Commit

Permalink
s4-torture: save cluster version in clusapi test context
Browse files Browse the repository at this point in the history
Guenther

Signed-off-by: Guenther Deschner <[email protected]>
Reviewed-by: Jeremy Allison <[email protected]>
  • Loading branch information
gd authored and jrasamba committed Jan 16, 2020
1 parent 8dca8aa commit efe353e
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions source4/torture/rpc/clusapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ struct torture_clusapi_context {
struct dcerpc_pipe *p;
const char *NodeName;
const char *ClusterName;
uint16_t lpwMajorVersion;
uint16_t lpwMinorVersion;
uint16_t lpwBuildNumber;
};

static bool test_OpenCluster_int(struct torture_context *tctx,
Expand Down Expand Up @@ -3705,11 +3708,11 @@ static bool torture_rpc_clusapi_setup_common(struct torture_context *tctx,
torture_rpc_connection(tctx, &t->p, &ndr_table_clusapi),
"Error connecting to server");

b = t->p->binding_handle;

{
struct clusapi_GetClusterName r;

b = t->p->binding_handle;

r.out.ClusterName = &t->ClusterName;
r.out.NodeName = &t->NodeName;

Expand All @@ -3720,6 +3723,28 @@ static bool torture_rpc_clusapi_setup_common(struct torture_context *tctx,
r.out.result,
"GetClusterName failed");
}
{
struct clusapi_GetClusterVersion2 r;
const char *lpszVendorId;
const char *lpszCSDVersion;
struct CLUSTER_OPERATIONAL_VERSION_INFO *ppClusterOpVerInfo;
WERROR rpc_status;

r.out.lpwMajorVersion = &t->lpwMajorVersion;
r.out.lpwMinorVersion = &t->lpwMinorVersion;
r.out.lpwBuildNumber = &t->lpwBuildNumber;
r.out.lpszVendorId = &lpszVendorId;
r.out.lpszCSDVersion = &lpszCSDVersion;
r.out.ppClusterOpVerInfo = &ppClusterOpVerInfo;
r.out.rpc_status = &rpc_status;

torture_assert_ntstatus_ok(tctx,
dcerpc_clusapi_GetClusterVersion2_r(b, tctx, &r),
"GetClusterVersion2 failed");
torture_assert_werr_ok(tctx,
r.out.result,
"GetClusterVersion2 failed");
}

return true;
}
Expand Down

0 comments on commit efe353e

Please sign in to comment.