Zebediah Figura : rpcrt4/tests: Add a basic test for RPC_IF_AUTOLISTEN.

Alexandre Julliard julliard at winehq.org
Mon May 7 16:34:41 CDT 2018


Module: wine
Branch: master
Commit: 9d6d2eb3ce22ca2442a96a2cfcd3ebf2e7d59493
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=9d6d2eb3ce22ca2442a96a2cfcd3ebf2e7d59493

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Sat May  5 14:07:47 2018 -0500

rpcrt4/tests: Add a basic test for RPC_IF_AUTOLISTEN.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/rpcrt4/tests/server.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/dlls/rpcrt4/tests/server.c b/dlls/rpcrt4/tests/server.c
index 5278a1d..5a61181 100644
--- a/dlls/rpcrt4/tests/server.c
+++ b/dlls/rpcrt4/tests/server.c
@@ -1680,6 +1680,19 @@ client(const char *test)
     ok(RPC_S_OK == RpcStringFreeA(&binding), "RpcStringFree\n");
     ok(RPC_S_OK == RpcBindingFree(&IServer_IfHandle), "RpcBindingFree\n");
   }
+  else if (strcmp(test, "ncalrpc_autolisten") == 0)
+  {
+    ok(RPC_S_OK == RpcStringBindingComposeA(NULL, ncalrpc, NULL, guid, NULL, &binding), "RpcStringBindingCompose\n");
+    ok(RPC_S_OK == RpcBindingFromStringBindingA(binding, &IServer_IfHandle), "RpcBindingFromStringBinding\n");
+
+    run_tests();
+    authinfo_test(RPC_PROTSEQ_LRPC, 0);
+todo_wine
+    test_is_server_listening(IServer_IfHandle, RPC_S_NOT_LISTENING);
+
+    ok(RPC_S_OK == RpcStringFreeA(&binding), "RpcStringFree\n");
+    ok(RPC_S_OK == RpcBindingFree(&IServer_IfHandle), "RpcBindingFree\n");
+  }
   else if (strcmp(test, "ncalrpc_secure") == 0)
   {
     ok(RPC_S_OK == RpcStringBindingComposeA(NULL, ncalrpc, NULL, guid, NULL, &binding), "RpcStringBindingCompose\n");
@@ -1790,6 +1803,19 @@ server(void)
   CloseHandle(stop_event);
   stop_event = NULL;
 
+  if (pRpcServerRegisterIfEx)
+  {
+    status = pRpcServerRegisterIfEx(s_IServer_v0_0_s_ifspec, NULL, NULL,
+        RPC_IF_ALLOW_CALLBACKS_WITH_NO_AUTH | RPC_IF_AUTOLISTEN,
+        RPC_C_LISTEN_MAX_CALLS_DEFAULT, NULL);
+    ok(status == RPC_S_OK, "RpcServerRegisterIf() failed: %u\n", status);
+
+    run_client("ncalrpc_autolisten");
+
+    status = RpcServerUnregisterIf(s_IServer_v0_0_s_ifspec, NULL, TRUE);
+    ok(status == RPC_S_OK, "RpcServerUnregisterIf() failed: %u\n", status);
+  }
+
   CoUninitialize();
 }
 




More information about the wine-cvs mailing list