[PATCH] services/tests: Change pipe type from byte to message.

Bernhard Übelacker bernhardu at mailbox.org
Fri Oct 5 08:49:21 CDT 2018


Signed-off-by: Bernhard Übelacker <bernhardu at mailbox.org>
---
The line length or amount of messages introduced in the last patches
may cause partial reads in the test process that show therefore the error:
  Test failed: malformed service message: 1

Changing the type from BYTE to MESSAGE should make ReadFile receive
only complete messages.
---
 programs/services/tests/service.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/programs/services/tests/service.c b/programs/services/tests/service.c
index c68d37acdd..aaae6801f6 100644
--- a/programs/services/tests/service.c
+++ b/programs/services/tests/service.c
@@ -589,7 +589,7 @@ static void test_runner(void (*p_run_test)(void))
     sprintf(named_pipe_name, "\\\\.\\pipe\\%s_pipe", service_name);
 
     pipe_handle = CreateNamedPipeA(named_pipe_name, PIPE_ACCESS_INBOUND,
-                                   PIPE_TYPE_BYTE|PIPE_READMODE_BYTE|PIPE_WAIT, 10, 2048, 2048, 10000, NULL);
+                                   PIPE_TYPE_MESSAGE|PIPE_READMODE_MESSAGE|PIPE_WAIT, 10, 2048, 2048, 10000, NULL);
     ok(pipe_handle != INVALID_HANDLE_VALUE, "CreateNamedPipe failed: %u\n", GetLastError());
     if(pipe_handle == INVALID_HANDLE_VALUE)
         return;
-- 
2.19.0




More information about the wine-devel mailing list