Commit b210eeb1 authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

kernel32/tests: Test waiting on a disconnected client pipe.

parent 0bca442f
...@@ -836,6 +836,7 @@ static int test_DisconnectNamedPipe(void) ...@@ -836,6 +836,7 @@ static int test_DisconnectNamedPipe(void)
char ibuf[32]; char ibuf[32];
DWORD written; DWORD written;
DWORD readden; DWORD readden;
DWORD ret;
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
hnp = CreateNamedPipe(PIPENAME, PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE | PIPE_WAIT, hnp = CreateNamedPipe(PIPENAME, PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE | PIPE_WAIT,
...@@ -876,6 +877,8 @@ static int test_DisconnectNamedPipe(void) ...@@ -876,6 +877,8 @@ static int test_DisconnectNamedPipe(void)
"ReadFile from disconnected pipe with bytes waiting\n"); "ReadFile from disconnected pipe with bytes waiting\n");
ok(!DisconnectNamedPipe(hnp) && GetLastError() == ERROR_PIPE_NOT_CONNECTED, ok(!DisconnectNamedPipe(hnp) && GetLastError() == ERROR_PIPE_NOT_CONNECTED,
"DisconnectNamedPipe worked twice\n"); "DisconnectNamedPipe worked twice\n");
ret = WaitForSingleObject(hFile, 0);
ok(ret == WAIT_TIMEOUT, "WaitForSingleObject returned %X\n", ret);
ok(CloseHandle(hFile), "CloseHandle\n"); ok(CloseHandle(hFile), "CloseHandle\n");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment