Module: wine
Branch: master
Commit: fd8cb3f9c25d13428e1ff65c65b54b3cc0e84342
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fd8cb3f9c25d13428e1ff65c6…
Author: Rob Shearman <robertshearman(a)gmail.com>
Date: Sat Jun 14 16:42:32 2008 +0100
rpcrt4: Reduce the timeout of waiting on the stop event in the server test to one second.
The stop event should already be signaled by the time we get to that
point since we wait until the child processes terminate in the server
process and the stop event is signaled in the context of one of the
child processes.
Don't call RpcMgmtWaitServerListening if the call to
WaitForSingleObject failed since it is likely that s_stop() hasn't
been called and therefore the call to RpcMgmtWaitServerListening won't
ever return.
---
dlls/rpcrt4/tests/server.c | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/dlls/rpcrt4/tests/server.c b/dlls/rpcrt4/tests/server.c
index 5f6da37..6c0527f 100644
--- a/dlls/rpcrt4/tests/server.c
+++ b/dlls/rpcrt4/tests/server.c
@@ -1242,6 +1242,7 @@ server(void)
RPC_STATUS status, iptcp_status, np_status;
RPC_STATUS (RPC_ENTRY *pRpcServerRegisterIfEx)(RPC_IF_HANDLE,UUID*,
RPC_MGR_EPV*, unsigned int,unsigned int,RPC_IF_CALLBACK_FN*);
+ DWORD ret;
iptcp_status = RpcServerUseProtseqEp(iptcp, 20, port, NULL);
ok(iptcp_status == RPC_S_OK, "RpcServerUseProtseqEp(ncacn_ip_tcp) failed with status %ld\n", iptcp_status);
@@ -1278,10 +1279,16 @@ server(void)
return;
}
- ok(WAIT_OBJECT_0 == WaitForSingleObject(stop_event, 60000), "WaitForSingleObject\n");
- status = RpcMgmtWaitServerListen();
- todo_wine {
- ok(status == RPC_S_OK, "RpcMgmtWaitServerListening failed with status %ld\n", status);
+ ret = WaitForSingleObject(stop_event, 1000);
+ ok(WAIT_OBJECT_0 == ret, "WaitForSingleObject\n");
+ /* if the stop event didn't fire then RpcMgmtWaitServerListen will wait
+ * forever, so don't bother calling it in this case */
+ if (ret == WAIT_OBJECT_0)
+ {
+ status = RpcMgmtWaitServerListen();
+ todo_wine {
+ ok(status == RPC_S_OK, "RpcMgmtWaitServerListening failed with status %ld\n", status);
+ }
}
}
Module: wine
Branch: master
Commit: 9ce356c966b79f33e2d537521dc22191aad642af
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9ce356c966b79f33e2d537521…
Author: Rob Shearman <robertshearman(a)gmail.com>
Date: Sat Jun 14 16:31:46 2008 +0100
rpcrt4: Save the previous BufferLength in test_ndr_buffer and use it when testing the expected buffer length after the NdrFreeBuffer call.
This fixes a test failure on Win2003 upwards when the allocated length
appears to be rounded up to a multiple of 4.
---
dlls/rpcrt4/tests/ndr_marshall.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/dlls/rpcrt4/tests/ndr_marshall.c b/dlls/rpcrt4/tests/ndr_marshall.c
index 3683027..84a3891 100644
--- a/dlls/rpcrt4/tests/ndr_marshall.c
+++ b/dlls/rpcrt4/tests/ndr_marshall.c
@@ -1795,6 +1795,7 @@ static void test_ndr_buffer(void)
unsigned char *binding;
RPC_BINDING_HANDLE Handle;
RPC_STATUS status;
+ ULONG prev_buffer_length;
StubDesc.RpcInterfaceInformation = (void *)&IFoo___RpcServerInterface;
@@ -1832,11 +1833,12 @@ todo_wine
ok(StubMsg.BufferLength == 0, "BufferLength should have left as 0 instead of being set to %d\n", StubMsg.BufferLength);
ok(StubMsg.fBufferValid == TRUE, "fBufferValid should have been TRUE instead of 0x%x\n", StubMsg.fBufferValid);
+ prev_buffer_length = RpcMessage.BufferLength;
StubMsg.BufferLength = 1;
NdrFreeBuffer(&StubMsg);
ok(RpcMessage.Handle != NULL, "RpcMessage.Handle should not have been NULL\n");
ok(RpcMessage.Buffer != NULL, "RpcMessage.Buffer should not have been NULL\n");
- ok(RpcMessage.BufferLength == 10, "RpcMessage.BufferLength should have been left as 10 instead of %d\n", RpcMessage.BufferLength);
+ ok(RpcMessage.BufferLength == prev_buffer_length, "RpcMessage.BufferLength should have been left as %d instead of %d\n", prev_buffer_length, RpcMessage.BufferLength);
ok(StubMsg.Buffer != NULL, "Buffer should not have been NULL\n");
ok(StubMsg.BufferLength == 1, "BufferLength should have left as 1 instead of being set to %d\n", StubMsg.BufferLength);
ok(StubMsg.fBufferValid == FALSE, "fBufferValid should have been FALSE instead of 0x%x\n", StubMsg.fBufferValid);