From: Günther Deschner Date: Mon, 13 Jan 2020 15:11:26 +0000 (+0100) Subject: s4-torture: save cluster version in clusapi test context X-Git-Tag: samba-4.12.0rc1~84 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=efe353edf486ee2ab351735a8f927fe607046bb1;p=thirdparty%2Fsamba.git s4-torture: save cluster version in clusapi test context Guenther Signed-off-by: Guenther Deschner Reviewed-by: Jeremy Allison --- diff --git a/source4/torture/rpc/clusapi.c b/source4/torture/rpc/clusapi.c index 6597b441841..46950aff4e1 100644 --- a/source4/torture/rpc/clusapi.c +++ b/source4/torture/rpc/clusapi.c @@ -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, @@ -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; @@ -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; }