[PATCH] rpcrt4/tests: Fix the rpc tests on Win9x and NT4

Detlef Riekenberg wine.dev at web.de
Sat Aug 9 16:19:20 CDT 2008


---
 dlls/rpcrt4/tests/rpc.c |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/dlls/rpcrt4/tests/rpc.c b/dlls/rpcrt4/tests/rpc.c
index 02113d3..65660e4 100644
--- a/dlls/rpcrt4/tests/rpc.c
+++ b/dlls/rpcrt4/tests/rpc.c
@@ -262,7 +262,9 @@ todo_wine {
 
     status = RpcBindingSetAuthInfo(IFoo_IfHandle, NULL, RPC_C_AUTHN_LEVEL_NONE,
                                    RPC_C_AUTHN_WINNT, NULL, RPC_C_AUTHZ_NAME);
-    ok(status == RPC_S_OK, "RpcBindingSetAuthInfo failed (%lu)\n", status);
+    /* NT: RPC_S_OK, 9x: RPC_S_UNKNOWN_AUTHN_SERVICE */
+    ok(status == RPC_S_OK || status == RPC_S_UNKNOWN_AUTHN_SERVICE,
+        "RpcBindingSetAuthInfo failed (%lu)\n", status);
 
     status = RpcMgmtStopServerListening(NULL);
     ok(status == RPC_S_OK, "RpcMgmtStopServerListening failed (%lu)\n",
@@ -382,7 +384,9 @@ static void test_towers(void)
     ok(ret == RPC_S_OK, "TowerConstruct failed with error %ld\n", ret);
     ret = TowerExplode(tower, NULL, NULL, NULL, NULL, &address);
     ok(ret == RPC_S_OK, "TowerExplode failed with error %ld\n", ret);
-    ok(!strcmp(address, "0.0.0.0"), "address was \"%s\" instead of \"0.0.0.0\"\n", address);
+    /* w2k and up: 0.0.0.0,  9x and NT4: 255.255.255.255 */
+    ok(!strcmp(address, "0.0.0.0") || !strcmp(address, "255.255.255.255"),
+        "address was \"%s\" instead of \"0.0.0.0\" or \"255.255.255.255\"\n", address);
 
     I_RpcFree(address);
     I_RpcFree(tower);
@@ -688,7 +692,9 @@ static void test_endpoint_mapper(void)
     unsigned char *binding;
 
     status = RpcServerUseProtseqEp(ncacn_ip_tcp, 20, endpoint, NULL);
-    ok(status == RPC_S_OK, "RpcServerUseProtseqEp failed (%lu)\n", status);
+    /* NT: RPC_S_OK, 9x: RPC_S_PROTSEQ_NOT_SUPPORTED */
+    ok(status == RPC_S_OK || status == RPC_S_PROTSEQ_NOT_SUPPORTED,
+        "RpcServerUseProtseqEp failed (%lu)\n", status);
 
     status = RpcServerRegisterIf(IFoo_v0_0_s_ifspec, NULL, NULL);
     ok(status == RPC_S_OK, "RpcServerRegisterIf failed (%lu)\n", status);
@@ -707,7 +713,9 @@ static void test_endpoint_mapper(void)
     ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%lu)\n", status);
 
     status = RpcEpResolveBinding(handle, IFoo_v0_0_s_ifspec);
-    ok(status == RPC_S_OK, "RpcEpResolveBinding failed with error %lu\n", status);
+    /* NT: RPC_S_OK, 9x: RPC_S_SERVER_UNAVAILABLE */
+    ok(status == RPC_S_OK || status == RPC_S_SERVER_UNAVAILABLE,
+        "RpcEpResolveBinding failed with error %lu\n", status);
 
     status = RpcBindingFree(&handle);
     ok(status == RPC_S_OK, "RpcBindingFree failed with error %lu\n", status);
-- 
1.5.4.3


--=-4qrIFRc4PtjbiK8VerhC--




More information about the wine-patches mailing list