2 Unix SMB/CIFS implementation.
3 test suite for rpc witness operations
5 Copyright (C) Guenther Deschner 2015
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 #include "torture/rpc/torture_rpc.h"
24 #include "librpc/gen_ndr/ndr_witness_c.h"
25 #include "librpc/gen_ndr/ndr_srvsvc_c.h"
26 #include "librpc/gen_ndr/ndr_clusapi_c.h"
27 #include "param/param.h"
30 struct torture_test_clusapi_state
{
31 struct dcerpc_pipe
*p
;
34 struct torture_test_witness_state
{
36 const char *share_name
;
37 struct witness_interfaceList
*list
;
38 struct policy_handle context_handle
;
39 struct torture_test_clusapi_state clusapi
;
42 static bool test_witness_GetInterfaceList(struct torture_context
*tctx
,
43 struct dcerpc_pipe
*p
,
46 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
47 struct witness_GetInterfaceList r
;
48 struct witness_interfaceList
*l
;
49 struct torture_test_witness_state
*state
=
50 (struct torture_test_witness_state
*)data
;
52 r
.out
.interface_list
= &l
;
54 torture_assert_ntstatus_ok(tctx
,
55 dcerpc_witness_GetInterfaceList_r(b
, tctx
, &r
),
56 "GetInterfaceList failed");
58 torture_assert_werr_ok(tctx
,
60 "GetInterfaceList failed");
67 static bool find_sofs_share(struct torture_context
*tctx
,
68 const char **sofs_sharename
)
70 struct dcerpc_pipe
*p
;
71 struct dcerpc_binding_handle
*b
;
72 struct srvsvc_NetShareEnumAll r
;
73 struct srvsvc_NetShareInfoCtr info_ctr
;
74 struct srvsvc_NetShareCtr1 ctr1
;
75 uint32_t resume_handle
= 0;
76 uint32_t totalentries
= 0;
79 torture_assert_ntstatus_ok(tctx
,
80 torture_rpc_connection_transport(tctx
, &p
, &ndr_table_srvsvc
,
82 "failed to setup srvsvc connection");
84 b
= p
->binding_handle
;
89 info_ctr
.ctr
.ctr1
= &ctr1
;
91 r
.in
.server_unc
= dcerpc_server_name(p
);
93 r
.in
.info_ctr
= &info_ctr
;
94 r
.in
.resume_handle
= &resume_handle
;
95 r
.out
.totalentries
= &totalentries
;
96 r
.out
.info_ctr
= &info_ctr
;
97 r
.out
.resume_handle
= &resume_handle
;
99 torture_assert_ntstatus_ok(tctx
,
100 dcerpc_srvsvc_NetShareEnumAll_r(b
, tctx
, &r
),
101 "failed to call srvsvc_NetShareEnumAll");
103 torture_assert_werr_ok(tctx
,
105 "failed to call srvsvc_NetShareEnumAll");
107 for (i
=0; i
< r
.out
.info_ctr
->ctr
.ctr1
->count
; i
++) {
109 if (r
.out
.info_ctr
->ctr
.ctr1
->array
[i
].type
== STYPE_CLUSTER_SOFS
) {
110 *sofs_sharename
= talloc_strdup(tctx
, r
.out
.info_ctr
->ctr
.ctr1
->array
[i
].name
);
111 if (*sofs_sharename
== NULL
) {
114 torture_comment(tctx
, "using SOFS share: %s\n", *sofs_sharename
);
117 if (r
.out
.info_ctr
->ctr
.ctr1
->array
[i
].type
== STYPE_DISKTREE
) {
118 *sofs_sharename
= talloc_strdup(tctx
, r
.out
.info_ctr
->ctr
.ctr1
->array
[i
].name
);
119 if (*sofs_sharename
== NULL
) {
122 torture_comment(tctx
, "assuming SOFS share: %s\n", *sofs_sharename
);
130 static bool init_witness_test_state(struct torture_context
*tctx
,
131 struct dcerpc_pipe
*p
,
132 struct torture_test_witness_state
*state
)
134 if (state
->net_name
== NULL
) {
135 state
->net_name
= lpcfg_parm_string(tctx
->lp_ctx
, NULL
, "torture", "net_name");
138 if (state
->list
== NULL
) {
140 test_witness_GetInterfaceList(tctx
, p
, state
),
141 "failed to retrieve GetInterfaceList");
144 if (state
->share_name
== NULL
) {
145 find_sofs_share(tctx
, &state
->share_name
);
151 static bool test_witness_UnRegister_with_handle(struct torture_context
*tctx
,
152 struct dcerpc_pipe
*p
,
153 struct policy_handle
*context_handle
)
155 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
156 struct witness_UnRegister r
;
158 r
.in
.context_handle
= *context_handle
;
160 torture_assert_ntstatus_ok(tctx
,
161 dcerpc_witness_UnRegister_r(b
, tctx
, &r
),
162 "UnRegister failed");
164 torture_assert_werr_ok(tctx
,
166 "UnRegister failed");
168 /* make sure we are not able/allowed to reuse context handles after they
169 * have been unregistered */
171 torture_assert_ntstatus_ok(tctx
,
172 dcerpc_witness_UnRegister_r(b
, tctx
, &r
),
173 "UnRegister failed");
175 torture_assert_werr_equal(tctx
,
178 "UnRegister failed");
183 static bool test_witness_UnRegister(struct torture_context
*tctx
,
184 struct dcerpc_pipe
*p
,
187 /* acquire handle and free afterwards */
191 static bool get_ip_address_from_interface(struct torture_context
*tctx
,
192 struct witness_interfaceInfo
*i
,
193 const char **ip_address
)
195 if (i
->flags
& WITNESS_INFO_IPv4_VALID
) {
196 *ip_address
= talloc_strdup(tctx
, i
->ipv4
);
197 torture_assert(tctx
, *ip_address
, "talloc_strdup failed");
201 if (i
->flags
& WITNESS_INFO_IPv6_VALID
) {
202 *ip_address
= talloc_strdup(tctx
, i
->ipv6
);
203 torture_assert(tctx
, *ip_address
, "talloc_strdup failed");
210 static bool check_valid_interface(struct torture_context
*tctx
,
211 struct witness_interfaceInfo
*i
)
213 /* continue looking for an interface that allows witness
215 if (!(i
->flags
& WITNESS_INFO_WITNESS_IF
)) {
219 /* witness should be available of course */
220 if (i
->state
!= WITNESS_STATE_AVAILABLE
) {
227 static bool test_witness_Register(struct torture_context
*tctx
,
228 struct dcerpc_pipe
*p
,
231 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
232 struct witness_Register r
;
233 struct policy_handle context_handle
;
234 struct torture_test_witness_state
*state
=
235 (struct torture_test_witness_state
*)data
;
239 enum witness_version version
;
240 const char *net_name
;
241 const char *ip_address
;
242 const char *client_computer_name
;
243 NTSTATUS expected_status
;
244 WERROR expected_result
;
248 .expected_status
= NT_STATUS_OK
,
249 .expected_result
= WERR_REVISION_MISMATCH
252 .expected_status
= NT_STATUS_OK
,
253 .expected_result
= WERR_REVISION_MISMATCH
256 .expected_status
= NT_STATUS_OK
,
257 .expected_result
= WERR_REVISION_MISMATCH
260 .expected_status
= NT_STATUS_OK
,
261 .expected_result
= WERR_REVISION_MISMATCH
263 .version
= WITNESS_V2
,
264 .expected_status
= NT_STATUS_OK
,
265 .expected_result
= WERR_REVISION_MISMATCH
267 .version
= WITNESS_V1
,
270 .client_computer_name
= "",
271 .expected_status
= NT_STATUS_OK
,
272 .expected_result
= WERR_INVALID_PARAM
274 .version
= WITNESS_V1
,
277 .client_computer_name
= lpcfg_netbios_name(tctx
->lp_ctx
),
278 .expected_status
= NT_STATUS_OK
,
279 .expected_result
= WERR_INVALID_PARAM
281 .version
= WITNESS_V2
,
284 .client_computer_name
= lpcfg_netbios_name(tctx
->lp_ctx
),
285 .expected_status
= NT_STATUS_OK
,
286 .expected_result
= WERR_REVISION_MISMATCH
288 .version
= WITNESS_V1
,
289 .net_name
= dcerpc_server_name(p
),
291 .client_computer_name
= lpcfg_netbios_name(tctx
->lp_ctx
),
292 .expected_status
= NT_STATUS_OK
,
293 .expected_result
= WERR_INVALID_PARAM
298 for (i
=0; i
< ARRAY_SIZE(tests
); i
++) {
302 r
.out
.context_handle
= &context_handle
;
304 r
.in
.version
= tests
[i
].version
;
305 r
.in
.net_name
= tests
[i
].net_name
;
306 r
.in
.ip_address
= tests
[i
].ip_address
;
307 r
.in
.client_computer_name
= tests
[i
].client_computer_name
;
309 torture_assert_ntstatus_equal(tctx
,
310 dcerpc_witness_Register_r(b
, tctx
, &r
),
311 tests
[i
].expected_status
,
314 torture_assert_werr_equal(tctx
,
316 tests
[i
].expected_result
,
319 if (W_ERROR_IS_OK(r
.out
.result
)) {
321 /* we have a handle, make sure to unregister it */
323 test_witness_UnRegister_with_handle(tctx
, p
, r
.out
.context_handle
),
324 "Failed to unregister");
328 init_witness_test_state(tctx
, p
, state
);
330 for (i
=0; state
->list
&& i
< state
->list
->num_interfaces
; i
++) {
332 const char *ip_address
;
333 struct witness_interfaceInfo interface
= state
->list
->interfaces
[i
];
335 if (!check_valid_interface(tctx
, &interface
)) {
340 get_ip_address_from_interface(tctx
, &interface
, &ip_address
),
341 "failed to get ip_address from interface");
343 r
.in
.version
= WITNESS_V1
;
344 r
.in
.net_name
= state
->net_name
;
345 r
.in
.ip_address
= ip_address
;
347 torture_assert_ntstatus_ok(tctx
,
348 dcerpc_witness_Register_r(b
, tctx
, &r
),
351 torture_assert_werr_ok(tctx
,
356 test_witness_UnRegister_with_handle(tctx
, p
, r
.out
.context_handle
),
357 "Failed to unregister");
363 static bool test_witness_RegisterEx(struct torture_context
*tctx
,
364 struct dcerpc_pipe
*p
,
367 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
368 struct witness_RegisterEx r
;
369 struct policy_handle context_handle
;
370 struct torture_test_witness_state
*state
=
371 (struct torture_test_witness_state
*)data
;
375 enum witness_version version
;
376 const char *net_name
;
377 const char *ip_address
;
378 const char *client_computer_name
;
379 NTSTATUS expected_status
;
380 WERROR expected_result
;
384 .expected_status
= NT_STATUS_OK
,
385 .expected_result
= WERR_REVISION_MISMATCH
388 .expected_status
= NT_STATUS_OK
,
389 .expected_result
= WERR_REVISION_MISMATCH
392 .expected_status
= NT_STATUS_OK
,
393 .expected_result
= WERR_REVISION_MISMATCH
396 .expected_status
= NT_STATUS_OK
,
397 .expected_result
= WERR_REVISION_MISMATCH
399 .version
= WITNESS_V1
,
400 .expected_status
= NT_STATUS_OK
,
401 .expected_result
= WERR_REVISION_MISMATCH
403 .version
= WITNESS_V2
,
406 .client_computer_name
= "",
407 .expected_status
= NT_STATUS_OK
,
408 .expected_result
= WERR_INVALID_PARAM
410 .version
= WITNESS_V2
,
413 .client_computer_name
= lpcfg_netbios_name(tctx
->lp_ctx
),
414 .expected_status
= NT_STATUS_OK
,
415 .expected_result
= WERR_INVALID_PARAM
417 .version
= WITNESS_V1
,
420 .client_computer_name
= lpcfg_netbios_name(tctx
->lp_ctx
),
421 .expected_status
= NT_STATUS_OK
,
422 .expected_result
= WERR_REVISION_MISMATCH
424 .version
= WITNESS_V2
,
425 .net_name
= dcerpc_server_name(p
),
427 .client_computer_name
= lpcfg_netbios_name(tctx
->lp_ctx
),
428 .expected_status
= NT_STATUS_OK
,
429 .expected_result
= WERR_INVALID_PARAM
434 for (i
=0; i
< ARRAY_SIZE(tests
); i
++) {
438 r
.out
.context_handle
= &context_handle
;
440 r
.in
.version
= tests
[i
].version
;
441 r
.in
.net_name
= tests
[i
].net_name
;
442 r
.in
.ip_address
= tests
[i
].ip_address
;
443 r
.in
.client_computer_name
= tests
[i
].client_computer_name
;
445 torture_assert_ntstatus_equal(tctx
,
446 dcerpc_witness_RegisterEx_r(b
, tctx
, &r
),
447 tests
[i
].expected_status
,
448 "RegisterEx failed");
450 torture_assert_werr_equal(tctx
,
452 tests
[i
].expected_result
,
453 "RegisterEx failed");
455 if (W_ERROR_IS_OK(r
.out
.result
)) {
457 /* we have a handle, make sure to unregister it */
459 test_witness_UnRegister_with_handle(tctx
, p
, r
.out
.context_handle
),
460 "Failed to unregister");
464 init_witness_test_state(tctx
, p
, state
);
466 for (i
=0; state
->list
&& i
< state
->list
->num_interfaces
; i
++) {
468 const char *ip_address
;
469 struct witness_interfaceInfo interface
= state
->list
->interfaces
[i
];
471 if (!check_valid_interface(tctx
, &interface
)) {
476 get_ip_address_from_interface(tctx
, &interface
, &ip_address
),
477 "failed to get ip_address from interface");
479 r
.in
.version
= WITNESS_V2
;
480 r
.in
.net_name
= state
->net_name
;
481 r
.in
.ip_address
= ip_address
;
484 * a valid request with an invalid sharename fails with
487 r
.in
.share_name
= "any_invalid_share_name";
489 torture_assert_ntstatus_ok(tctx
,
490 dcerpc_witness_RegisterEx_r(b
, tctx
, &r
),
491 "RegisterEx failed");
493 torture_assert_werr_equal(tctx
,
496 "RegisterEx failed");
498 r
.in
.share_name
= NULL
;
500 torture_assert_ntstatus_ok(tctx
,
501 dcerpc_witness_RegisterEx_r(b
, tctx
, &r
),
502 "RegisterEx failed");
504 torture_assert_werr_ok(tctx
,
506 "RegisterEx failed");
509 test_witness_UnRegister_with_handle(tctx
, p
, r
.out
.context_handle
),
510 "Failed to unregister");
516 static bool setup_clusapi_connection(struct torture_context
*tctx
,
517 struct torture_test_witness_state
*s
)
525 status
= torture_rpc_connection_transport(tctx
, &s
->clusapi
.p
, &ndr_table_clusapi
, NCACN_IP_TCP
, 0);
526 if (!NT_STATUS_IS_OK(status
)) {
527 torture_comment(tctx
, "clusapi interface not available\n");
535 static bool cluster_get_nodes(struct torture_context
*tctx
,
536 struct torture_test_witness_state
*s
)
538 struct clusapi_CreateEnum r
;
539 struct ENUM_LIST
*ReturnEnum
;
541 struct dcerpc_binding_handle
*b
;
544 setup_clusapi_connection(tctx
, s
),
545 "failed to setup clusapi connection");
547 b
= s
->clusapi
.p
->binding_handle
;
549 r
.in
.dwType
= CLUSTER_ENUM_NODE
;
550 r
.out
.ReturnEnum
= &ReturnEnum
;
551 r
.out
.rpc_status
= &rpc_status
;
553 torture_assert_ntstatus_ok(tctx
,
554 dcerpc_clusapi_CreateEnum_r(b
, tctx
, &r
),
555 "failed to enumerate nodes");
561 static bool test_GetResourceState_int(struct torture_context
*tctx
,
562 struct dcerpc_pipe
*p
,
563 struct policy_handle
*hResource
,
564 enum clusapi_ClusterResourceState
*State
)
566 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
567 struct clusapi_GetResourceState r
;
568 const char *NodeName
;
569 const char *GroupName
;
572 r
.in
.hResource
= *hResource
;
574 r
.out
.NodeName
= &NodeName
;
575 r
.out
.GroupName
= &GroupName
;
576 r
.out
.rpc_status
= &rpc_status
;
578 torture_assert_ntstatus_ok(tctx
,
579 dcerpc_clusapi_GetResourceState_r(b
, tctx
, &r
),
580 "GetResourceState failed");
581 torture_assert_werr_ok(tctx
,
583 "GetResourceState failed");
588 static bool toggle_cluster_resource_state(struct torture_context
*tctx
,
589 struct dcerpc_pipe
*p
,
590 const char *resource_name
)
592 struct policy_handle hResource
;
593 enum clusapi_ClusterResourceState State
;
596 test_OpenResource_int(tctx
, p
, resource_name
, &hResource
),
597 "failed to open resource");
599 test_GetResourceState_int(tctx
, p
, &hResource
, &State
),
600 "failed to query resource state");
603 case ClusterResourceOffline
:
604 if (!test_OnlineResource_int(tctx
, p
, &hResource
)) {
605 test_CloseResource_int(tctx
, p
, &hResource
);
606 torture_warning(tctx
, "failed to set resource online");
610 case ClusterResourceOnline
:
611 if (!test_OfflineResource_int(tctx
, p
, &hResource
)) {
612 test_CloseResource_int(tctx
, p
, &hResource
);
613 torture_warning(tctx
, "failed to set resource offline");
622 test_CloseResource_int(tctx
, p
, &hResource
);
627 static bool test_witness_AsyncNotify(struct torture_context
*tctx
,
628 struct dcerpc_pipe
*p
,
631 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
632 struct witness_AsyncNotify r
;
633 struct witness_notifyResponse
*response
;
634 struct torture_test_witness_state
*state
=
635 (struct torture_test_witness_state
*)data
;
638 init_witness_test_state(tctx
, p
, state
);
640 setup_clusapi_connection(tctx
, state
);
642 for (i
=0; state
->list
&& i
< state
->list
->num_interfaces
; i
++) {
644 const char *ip_address
;
645 struct witness_interfaceInfo interface
= state
->list
->interfaces
[i
];
646 struct witness_Register reg
;
647 struct tevent_req
*req
;
649 if (!check_valid_interface(tctx
, &interface
)) {
654 get_ip_address_from_interface(tctx
, &interface
, &ip_address
),
655 "failed to get ip_address from interface");
657 reg
.in
.version
= WITNESS_V1
;
658 reg
.in
.net_name
= state
->net_name
;
659 reg
.in
.ip_address
= ip_address
;
660 reg
.in
.client_computer_name
= lpcfg_netbios_name(tctx
->lp_ctx
);
661 reg
.out
.context_handle
= &state
->context_handle
;
663 torture_assert_ntstatus_ok(tctx
,
664 dcerpc_witness_Register_r(b
, tctx
, ®
),
667 torture_assert_werr_ok(tctx
,
671 r
.in
.context_handle
= state
->context_handle
;
672 r
.out
.response
= &response
;
674 req
= dcerpc_witness_AsyncNotify_r_send(tctx
, tctx
->ev
, b
, &r
);
675 torture_assert(tctx
, req
, "failed to create request");
678 toggle_cluster_resource_state(tctx
, state
->clusapi
.p
, state
->net_name
),
679 "failed to toggle cluster resource state");
682 tevent_req_poll(req
, tctx
->ev
),
683 "failed to call event loop");
685 torture_assert_ntstatus_ok(tctx
,
686 dcerpc_witness_AsyncNotify_r_recv(req
, tctx
),
687 "failed to receive reply");
690 test_witness_UnRegister_with_handle(tctx
, p
, &state
->context_handle
),
691 "Failed to unregister");
693 ZERO_STRUCT(state
->context_handle
);
699 static bool test_do_witness_RegisterEx(struct torture_context
*tctx
,
700 struct dcerpc_binding_handle
*b
,
702 const char *net_name
,
703 const char *share_name
,
704 const char *ip_address
,
705 const char *client_computer_name
,
708 struct policy_handle
*context_handle
)
710 struct witness_RegisterEx r
;
712 r
.in
.version
= version
;
713 r
.in
.net_name
= net_name
;
714 r
.in
.share_name
= NULL
;
715 r
.in
.ip_address
= ip_address
;
716 r
.in
.client_computer_name
= client_computer_name
;
718 r
.in
.timeout
= timeout
;
719 r
.out
.context_handle
= context_handle
;
721 torture_assert_ntstatus_ok(tctx
,
722 dcerpc_witness_RegisterEx_r(b
, tctx
, &r
),
723 "RegisterEx failed");
725 torture_assert_werr_ok(tctx
,
727 "RegisterEx failed");
732 static void torture_subunit_report_time(struct torture_context
*tctx
)
738 if (clock_gettime(CLOCK_REALTIME
, &tp
) != 0) {
739 torture_comment(tctx
, "failed to call clock_gettime");
743 tmp
= localtime(&tp
.tv_sec
);
745 torture_comment(tctx
, "failed to call localtime");
749 if (strftime(timestr
, sizeof(timestr
), "%Y-%m-%d %H:%M:%S", tmp
) <= 0) {
750 torture_comment(tctx
, "failed to call strftime");
754 torture_comment(tctx
, "time: %s.%06ld\n", timestr
, tp
.tv_nsec
/ 1000);
757 static bool test_witness_AsyncNotify_timeouts(struct torture_context
*tctx
,
758 struct dcerpc_pipe
*p
,
761 struct dcerpc_binding_handle
*b
= p
->binding_handle
;
762 struct witness_AsyncNotify r
;
763 struct witness_notifyResponse
*response
;
764 struct torture_test_witness_state
*state
=
765 (struct torture_test_witness_state
*)data
;
768 init_witness_test_state(tctx
, p
, state
);
770 setup_clusapi_connection(tctx
, state
);
772 for (i
=0; state
->list
&& i
< state
->list
->num_interfaces
; i
++) {
774 const char *ip_address
;
775 struct witness_interfaceInfo interface
= state
->list
->interfaces
[i
];
776 uint32_t timeouts
[] = {
780 uint32_t old_timeout
;
782 if (!check_valid_interface(tctx
, &interface
)) {
787 get_ip_address_from_interface(tctx
, &interface
, &ip_address
),
788 "failed to get ip_address from interface");
790 for (t
=0; t
< ARRAY_SIZE(timeouts
); t
++) {
792 torture_comment(tctx
, "Testing Async Notify with timeout of %d milliseconds", timeouts
[t
]);
795 test_do_witness_RegisterEx(tctx
, b
,
800 lpcfg_netbios_name(tctx
->lp_ctx
),
803 &state
->context_handle
),
804 "failed to RegisterEx");
806 r
.in
.context_handle
= state
->context_handle
;
807 r
.out
.response
= &response
;
809 old_timeout
= dcerpc_binding_handle_set_timeout(b
, UINT_MAX
);
811 torture_subunit_report_time(tctx
);
813 torture_assert_ntstatus_ok(tctx
,
814 dcerpc_witness_AsyncNotify_r(b
, tctx
, &r
),
815 "AsyncNotify failed");
816 torture_assert_werr_equal(tctx
,
819 "AsyncNotify failed");
821 torture_subunit_report_time(tctx
);
823 dcerpc_binding_handle_set_timeout(b
, old_timeout
);
826 test_witness_UnRegister_with_handle(tctx
, p
, &state
->context_handle
),
827 "Failed to unregister");
829 ZERO_STRUCT(state
->context_handle
);
836 struct torture_suite
*torture_rpc_witness(TALLOC_CTX
*mem_ctx
)
838 struct torture_rpc_tcase
*tcase
;
839 struct torture_suite
*suite
= torture_suite_create(mem_ctx
, "witness");
840 struct torture_test_witness_state
*state
;
842 tcase
= torture_suite_add_rpc_iface_tcase(suite
, "witness",
845 state
= talloc_zero(tcase
, struct torture_test_witness_state
);
847 torture_rpc_tcase_add_test_ex(tcase
, "GetInterfaceList",
848 test_witness_GetInterfaceList
, state
);
849 torture_rpc_tcase_add_test_ex(tcase
, "Register",
850 test_witness_Register
, state
);
851 torture_rpc_tcase_add_test_ex(tcase
, "UnRegister",
852 test_witness_UnRegister
, state
);
853 torture_rpc_tcase_add_test_ex(tcase
, "RegisterEx",
854 test_witness_RegisterEx
, state
);
855 torture_rpc_tcase_add_test_ex(tcase
, "AsyncNotify",
856 test_witness_AsyncNotify
, state
);
857 torture_rpc_tcase_add_test_ex(tcase
, "AsyncNotify_timeouts",
858 test_witness_AsyncNotify_timeouts
, state
);