Rebase against a2c6a2beb68cae239d72e012aa8d4af113b8aaa7.

This commit is contained in:
Sebastian Lackner 2015-11-23 18:22:33 +01:00
parent 7d18a5d9b8
commit be3e802c6f
21 changed files with 113 additions and 526 deletions

View File

@ -1,127 +0,0 @@
From ce6c2fe58743667cec2ce798bbcd938f44d71b80 Mon Sep 17 00:00:00 2001
From: Adam Martinson <adam.r.martinson@gmail.com>
Date: Tue, 18 Dec 2012 15:52:57 -0600
Subject: kernel32/tests: Add tests for closing named pipes.
Changes in v2:
* Add SetLastError().
---
dlls/kernel32/tests/pipe.c | 95 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 95 insertions(+)
diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c
index 246ee30..f42fe5c 100644
--- a/dlls/kernel32/tests/pipe.c
+++ b/dlls/kernel32/tests/pipe.c
@@ -923,6 +923,100 @@ static void test_CreateNamedPipe_instances_must_match(void)
ok(CloseHandle(hnp2), "CloseHandle\n");
}
+static void test_CloseNamedPipe(void)
+{
+ HANDLE hnp;
+ HANDLE hFile;
+ static const char obuf[] = "Bit Bucket";
+ char ibuf[32];
+ DWORD written;
+ DWORD readden;
+
+ hnp = CreateNamedPipeA(PIPENAME, PIPE_ACCESS_DUPLEX,
+ PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT,
+ /* nMaxInstances */ 1,
+ /* nOutBufSize */ 1024,
+ /* nInBufSize */ 1024,
+ /* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT,
+ /* lpSecurityAttrib */ NULL);
+ ok(hnp != INVALID_HANDLE_VALUE, "CreateNamedPipe failed\n");
+
+ hFile = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0);
+ ok(hFile != INVALID_HANDLE_VALUE, "CreateFile failed (%d)\n", GetLastError());
+
+ /* don't try to do i/o if one side couldn't be opened, as it hangs */
+ if (hFile != INVALID_HANDLE_VALUE)
+ {
+ /* Make sure we can read and write a few bytes in both directions */
+ memset(ibuf, 0, sizeof(ibuf));
+ ok(WriteFile(hnp, obuf, sizeof(obuf), &written, NULL), "WriteFile\n");
+ ok(written == sizeof(obuf), "write file len 1\n");
+ ok(PeekNamedPipe(hFile, NULL, 0, NULL, &readden, NULL), "Peek\n");
+ ok(readden == sizeof(obuf), "got %d bytes\n", readden);
+
+ /* close server end without disconnecting */
+ ok(CloseHandle(hnp), "CloseHandle() failed: %08x\n", GetLastError());
+
+ todo_wine
+ ok(ReadFile(hFile, ibuf, 0, &readden, NULL), "ReadFile() failed: %08x\n", GetLastError());
+ ok(readden == 0, "got %d bytes\n", readden);
+
+ memset(ibuf, 0, sizeof(ibuf));
+ ok(ReadFile(hFile, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile() failed: %08x\n", GetLastError());
+ ok(readden == sizeof(obuf), "got %d bytes\n", readden);
+ /* pipe is empty now */
+
+ SetLastError(0xdeadbeef);
+ ok(!ReadFile(hFile, ibuf, 0, &readden, NULL), "ReadFile() succeeded\n");
+ ok(GetLastError() == ERROR_BROKEN_PIPE, "GetLastError() returned %08x, expected ERROR_BROKEN_PIPE\n", GetLastError());
+ SetLastError(0);
+
+ CloseHandle(hFile);
+ }
+
+ hnp = CreateNamedPipeA(PIPENAME, PIPE_ACCESS_DUPLEX,
+ PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT,
+ /* nMaxInstances */ 1,
+ /* nOutBufSize */ 1024,
+ /* nInBufSize */ 1024,
+ /* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT,
+ /* lpSecurityAttrib */ NULL);
+ ok(hnp != INVALID_HANDLE_VALUE, "CreateNamedPipe failed\n");
+
+ hFile = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0);
+ ok(hFile != INVALID_HANDLE_VALUE, "CreateFile failed (%d)\n", GetLastError());
+
+ if (hFile != INVALID_HANDLE_VALUE)
+ {
+ /* Make sure we can read and write a few bytes in both directions */
+ memset(ibuf, 0, sizeof(ibuf));
+ ok(WriteFile(hFile, obuf, sizeof(obuf), &written, NULL), "WriteFile\n");
+ ok(written == sizeof(obuf), "write file len 1\n");
+ ok(PeekNamedPipe(hnp, NULL, 0, NULL, &readden, NULL), "Peek\n");
+ ok(readden == sizeof(obuf), "got %d bytes\n", readden);
+
+ /* close client end without disconnecting */
+ ok(CloseHandle(hFile), "CloseHandle() failed: %08x\n", GetLastError());
+
+ /* you'd think ERROR_MORE_DATA, but no */
+ todo_wine
+ ok(ReadFile(hnp, ibuf, 0, &readden, NULL), "ReadFile() failed: %08x\n", GetLastError());
+ ok(readden == 0, "got %d bytes\n", readden);
+
+ memset(ibuf, 0, sizeof(ibuf));
+ ok(ReadFile(hnp, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile() failed: %08x\n", GetLastError());
+ ok(readden == sizeof(obuf), "got %d bytes\n", readden);
+ /* pipe is empty now */
+
+ SetLastError(0xdeadbeef);
+ ok(!ReadFile(hnp, ibuf, 0, &readden, NULL), "ReadFile() succeeded\n");
+ ok(GetLastError() == ERROR_BROKEN_PIPE, "GetLastError() returned %08x, expected ERROR_BROKEN_PIPE\n", GetLastError());
+ SetLastError(0);
+
+ CloseHandle(hnp);
+ }
+}
+
/** implementation of alarm() */
static DWORD CALLBACK alarmThreadMain(LPVOID arg)
{
@@ -2425,6 +2519,7 @@ START_TEST(pipe)
test_NamedPipe_2();
test_CreateNamedPipe(PIPE_TYPE_BYTE);
test_CreateNamedPipe(PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE);
+ test_CloseNamedPipe();
test_CreatePipe();
test_impersonation();
test_overlapped();
--
2.1.3

View File

@ -1,6 +1,6 @@
From 24ad6b8855d6739be102ed3d1cd3d18b39e3fceb Mon Sep 17 00:00:00 2001
From cdb1ae761d777e7a1cf4c73edd946c94d1e73700 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 11 Aug 2014 18:20:52 +0200
Date: Mon, 11 Aug 2014 05:01:11 +0200
Subject: ntdll: Add handling for partially received messages in NtReadFile.
Changes in v2:
@ -13,12 +13,12 @@ Changes in v3:
Changes in v4:
* Include changes from later patch.
---
dlls/kernel32/tests/pipe.c | 53 +++++-----------------------------------------
dlls/ntdll/file.c | 28 ++++++++++++++++++------
2 files changed, 27 insertions(+), 54 deletions(-)
dlls/kernel32/tests/pipe.c | 57 +++++++---------------------------------------
dlls/ntdll/file.c | 28 ++++++++++++++++++-----
2 files changed, 30 insertions(+), 55 deletions(-)
diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c
index dff00c9..81b4581 100644
index 5f5553b..3811ccd 100644
--- a/dlls/kernel32/tests/pipe.c
+++ b/dlls/kernel32/tests/pipe.c
@@ -305,9 +305,7 @@ static void test_CreateNamedPipe(int pipemode)
@ -207,23 +207,27 @@ index dff00c9..81b4581 100644
ok(GetLastError() == ERROR_MORE_DATA, "wrong error\n");
}
ok(readden == 32, "read got %d bytes\n", readden);
@@ -949,7 +911,6 @@ static void test_CloseNamedPipe(void)
/* close server end without disconnecting */
ok(CloseHandle(hnp), "CloseHandle() failed: %08x\n", GetLastError());
@@ -1657,7 +1619,7 @@ static void test_CloseHandle(void)
numbytes = 0xdeadbeef;
memset(buffer, 0, sizeof(buffer));
ret = ReadFile(hfile, buffer, 0, &numbytes, NULL);
- todo_wine ok(ret, "ReadFile failed with %u\n", GetLastError());
+ ok(ret, "ReadFile failed with %u\n", GetLastError());
ok(numbytes == 0, "expected 0, got %u\n", numbytes);
- todo_wine
ok(ReadFile(hFile, ibuf, 0, &readden, NULL), "ReadFile() failed: %08x\n", GetLastError());
ok(readden == 0, "got %d bytes\n", readden);
numbytes = 0xdeadbeef;
@@ -1750,8 +1712,8 @@ static void test_CloseHandle(void)
numbytes = 0xdeadbeef;
memset(buffer, 0, sizeof(buffer));
ret = ReadFile(hpipe, buffer, 0, &numbytes, NULL);
- todo_wine ok(ret || broken(GetLastError() == ERROR_MORE_DATA) /* >= Win 8 */,
- "ReadFile failed with %u\n", GetLastError());
+ ok(ret || broken(GetLastError() == ERROR_MORE_DATA) /* >= Win 8 */,
+ "ReadFile failed with %u\n", GetLastError());
ok(numbytes == 0, "expected 0, got %u\n", numbytes);
@@ -991,7 +952,6 @@ static void test_CloseNamedPipe(void)
ok(CloseHandle(hFile), "CloseHandle() failed: %08x\n", GetLastError());
/* you'd think ERROR_MORE_DATA, but no */
- todo_wine
ok(ReadFile(hnp, ibuf, 0, &readden, NULL), "ReadFile() failed: %08x\n", GetLastError());
ok(readden == 0, "got %d bytes\n", readden);
@@ -2459,7 +2419,6 @@ static void test_readfileex_pending(void)
numbytes = 0xdeadbeef;
@@ -2559,7 +2521,6 @@ static void test_readfileex_pending(void)
SetLastError(0xdeadbeef);
ret = ReadFile(server, read_buf, 0, &num_bytes, &overlapped);
ok(!ret, "ReadFile should fail\n");
@ -231,7 +235,7 @@ index dff00c9..81b4581 100644
ok(GetLastError() == ERROR_IO_PENDING, "expected ERROR_IO_PENDING, got %d\n", GetLastError());
ok(num_bytes == 0, "bytes %u\n", num_bytes);
ok((NTSTATUS)overlapped.Internal == STATUS_PENDING, "expected STATUS_PENDING, got %#lx\n", overlapped.Internal);
@@ -2475,11 +2434,9 @@ todo_wine
@@ -2575,11 +2536,9 @@ todo_wine
ok(num_bytes == 1, "bytes %u\n", num_bytes);
wait = WaitForSingleObject(event, 100);
@ -244,10 +248,10 @@ index dff00c9..81b4581 100644
ok(overlapped.InternalHigh == 0, "expected 0, got %lu\n", overlapped.InternalHigh);
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index d8579a9..2c8855c 100644
index fd6c605..18ee740 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -441,7 +441,7 @@ NTSTATUS FILE_GetNtStatus(void)
@@ -490,7 +490,7 @@ NTSTATUS FILE_GetNtStatus(void)
}
}
@ -256,7 +260,7 @@ index d8579a9..2c8855c 100644
static NTSTATUS unix_fd_avail(int fd, int *avail)
{
struct pollfd pollfd;
@@ -470,7 +470,14 @@ static NTSTATUS unix_fd_avail(int fd, int *avail)
@@ -519,7 +519,14 @@ static NTSTATUS unix_fd_avail(int fd, int *avail)
static inline int get_pipe_flags(int fd)
{
#ifdef __linux__
@ -272,7 +276,7 @@ index d8579a9..2c8855c 100644
#else
return 0;
#endif
@@ -516,10 +523,12 @@ static NTSTATUS read_unix_fd(int fd, char *buf, ULONG *total, ULONG length,
@@ -565,10 +572,12 @@ static NTSTATUS read_unix_fd(int fd, char *buf, ULONG *total, ULONG length,
if (result >= 0)
{
*total += result;
@ -287,7 +291,7 @@ index d8579a9..2c8855c 100644
switch (type)
{
case FD_TYPE_FILE:
@@ -527,11 +536,18 @@ static NTSTATUS read_unix_fd(int fd, char *buf, ULONG *total, ULONG length,
@@ -577,11 +586,18 @@ static NTSTATUS read_unix_fd(int fd, char *buf, ULONG *total, ULONG length,
return length ? STATUS_END_OF_FILE : STATUS_SUCCESS;
case FD_TYPE_SERIAL:
return STATUS_PENDING;
@ -307,7 +311,7 @@ index d8579a9..2c8855c 100644
continue;
else if (type != FD_TYPE_FILE) /* no async I/O on regular files */
return STATUS_PENDING;
@@ -890,7 +906,7 @@ done:
@@ -1039,7 +1055,7 @@ done:
err:
if (needs_close) close( unix_handle );
@ -317,5 +321,5 @@ index d8579a9..2c8855c 100644
io_status->u.Status = status;
io_status->Information = total;
--
2.3.0
2.6.2

View File

@ -1,4 +1,4 @@
From 186746674015db7533c9b25c8b633c2e3881334e Mon Sep 17 00:00:00 2001
From 8208e3f7c671c71b3b7d25d854e860aad7c45697 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 11 Aug 2014 00:56:46 +0200
Subject: kernel32/tests: Test sending, peeking and receiving an empty message.
@ -8,14 +8,14 @@ Changes in v2:
We need a lot of ugly code to prevent the tests from deadlocking...
* Fix issue in broken pipe check, should be moved into an earlier patch.
---
dlls/kernel32/tests/pipe.c | 336 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 336 insertions(+)
dlls/kernel32/tests/pipe.c | 267 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 267 insertions(+)
diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c
index 53f8f30..89a13f5 100644
index 5f2c4d7..76cf018 100644
--- a/dlls/kernel32/tests/pipe.c
+++ b/dlls/kernel32/tests/pipe.c
@@ -337,6 +337,146 @@ static void test_CreateNamedPipe(int pipemode)
@@ -338,6 +338,146 @@ static void test_CreateNamedPipe(int pipemode)
ok(readden == sizeof(obuf2) - 8, "read got %d bytes\n", readden);
ok(memcmp(obuf2, ibuf, written) == 0, "content check\n");
@ -162,7 +162,7 @@ index 53f8f30..89a13f5 100644
/* Test reading of multiple writes */
memset(ibuf, 0, sizeof(ibuf));
ok(WriteFile(hnp, obuf, sizeof(obuf), &written, NULL), "WriteFile3a\n");
@@ -455,6 +595,133 @@ static void test_CreateNamedPipe(int pipemode)
@@ -456,6 +596,133 @@ static void test_CreateNamedPipe(int pipemode)
if (readden <= sizeof(obuf))
ok(ReadFile(hnp, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile\n");
@ -296,89 +296,6 @@ index 53f8f30..89a13f5 100644
/* Test how ReadFile behaves when the buffer is not big enough for the whole message */
memset(ibuf, 0, sizeof(ibuf));
ok(WriteFile(hnp, obuf2, sizeof(obuf2), &written, NULL), "WriteFile 7\n");
@@ -938,6 +1205,41 @@ static void test_CloseNamedPipe(void)
hFile = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0);
ok(hFile != INVALID_HANDLE_VALUE, "CreateFile failed (%d)\n", GetLastError());
+ /* don't try to do i/o if one side couldn't be opened, as it hangs */
+ if (hFile != INVALID_HANDLE_VALUE)
+ {
+ ok(WriteFile(hnp, obuf, 0, &written, NULL), "WriteFile\n");
+ ok(written == 0, "write file len 1\n");
+
+ /* close server end without disconnecting */
+ ok(CloseHandle(hnp), "CloseHandle() failed: %08x\n", GetLastError());
+
+ todo_wine
+ ok(ReadFile(hFile, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile() failed: %08x\n", GetLastError());
+ ok(readden == 0, "got %d bytes\n", readden);
+ /* pipe is empty now */
+
+ SetLastError(0xdeadbeef);
+ ok(!ReadFile(hFile, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile() succeeded\n");
+ todo_wine
+ ok(GetLastError() == ERROR_BROKEN_PIPE, "GetLastError() returned %08x, expected ERROR_BROKEN_PIPE\n", GetLastError());
+ SetLastError(0);
+
+ CloseHandle(hFile);
+ }
+
+ hnp = CreateNamedPipeA(PIPENAME, PIPE_ACCESS_DUPLEX,
+ PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT,
+ /* nMaxInstances */ 1,
+ /* nOutBufSize */ 1024,
+ /* nInBufSize */ 1024,
+ /* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT,
+ /* lpSecurityAttrib */ NULL);
+ ok(hnp != INVALID_HANDLE_VALUE, "CreateNamedPipe failed\n");
+
+ hFile = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0);
+ ok(hFile != INVALID_HANDLE_VALUE, "CreateFile failed (%d)\n", GetLastError());
+
if (hFile != INVALID_HANDLE_VALUE)
{
/* Make sure we can read and write a few bytes in both directions */
@@ -966,6 +1268,40 @@ static void test_CloseNamedPipe(void)
CloseHandle(hnp);
}
+
+ hnp = CreateNamedPipeA(PIPENAME, PIPE_ACCESS_DUPLEX,
+ PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT,
+ /* nMaxInstances */ 1,
+ /* nOutBufSize */ 1024,
+ /* nInBufSize */ 1024,
+ /* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT,
+ /* lpSecurityAttrib */ NULL);
+ ok(hnp != INVALID_HANDLE_VALUE, "CreateNamedPipe failed\n");
+
+ hFile = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0);
+ ok(hFile != INVALID_HANDLE_VALUE, "CreateFile failed (%d)\n", GetLastError());
+
+ /* don't try to do i/o if one side couldn't be opened, as it hangs */
+ if (hFile != INVALID_HANDLE_VALUE)
+ {
+ ok(WriteFile(hFile, obuf, 0, &written, NULL), "WriteFile\n");
+ ok(written == 0, "write file len 1\n");
+
+ /* close server end without disconnecting */
+ ok(CloseHandle(hFile), "CloseHandle() failed: %08x\n", GetLastError());
+
+ todo_wine
+ ok(ReadFile(hnp, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile() failed: %08x\n", GetLastError());
+ ok(readden == 0, "got %d bytes\n", readden);
+ /* pipe is empty now */
+
+ SetLastError(0xdeadbeef);
+ ok(!ReadFile(hnp, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile() succeeded\n");
+ ok(GetLastError() == ERROR_BROKEN_PIPE, "GetLastError() returned %08x, expected ERROR_BROKEN_PIPE\n", GetLastError());
+ SetLastError(0);
+
+ CloseHandle(hnp);
+ }
}
/** implementation of alarm() */
--
2.1.3
2.6.2

View File

@ -1,4 +1,4 @@
From bd5a5c11c29a52bd7891e8c3da6ff77846085ecd Mon Sep 17 00:00:00 2001
From 18c1a541928b5ef39f647e18f37c7cfdeac1483c Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 11 Aug 2014 04:19:49 +0200
Subject: kernel32/tests: Add tests for PIPE_NOWAIT in message mode.
@ -8,10 +8,10 @@ Subject: kernel32/tests: Add tests for PIPE_NOWAIT in message mode.
1 file changed, 96 insertions(+)
diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c
index 89a13f5..49a1017 100644
index 76cf018..35755b3 100644
--- a/dlls/kernel32/tests/pipe.c
+++ b/dlls/kernel32/tests/pipe.c
@@ -2527,6 +2527,101 @@ static void test_overlapped(void)
@@ -2561,6 +2561,101 @@ static void test_overlapped(void)
CloseHandle(thread);
}
@ -113,8 +113,8 @@ index 89a13f5..49a1017 100644
static void test_NamedPipeHandleState(void)
{
HANDLE server, client;
@@ -2952,6 +3047,7 @@ START_TEST(pipe)
test_CreatePipe();
@@ -2984,6 +3079,7 @@ START_TEST(pipe)
test_CloseHandle();
test_impersonation();
test_overlapped();
+ test_nowait();
@ -122,5 +122,5 @@ index 89a13f5..49a1017 100644
test_readfileex_pending();
}
--
2.1.3
2.6.2

View File

@ -1,4 +1,4 @@
From f0904b45622aa329e02dba205bfedd78379cde98 Mon Sep 17 00:00:00 2001
From 813744368ba23f2e06e06029bf93955760f10a7c Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 11 Aug 2014 05:34:19 +0200
Subject: ntdll: Allow to set PIPE_NOWAIT on byte-mode pipes.
@ -12,10 +12,10 @@ matches the native implementation.
2 files changed, 31 insertions(+), 8 deletions(-)
diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c
index 49a1017..f90401a 100644
index 35755b3..e464469 100644
--- a/dlls/kernel32/tests/pipe.c
+++ b/dlls/kernel32/tests/pipe.c
@@ -2527,7 +2527,7 @@ static void test_overlapped(void)
@@ -2561,7 +2561,7 @@ static void test_overlapped(void)
CloseHandle(thread);
}
@ -24,7 +24,7 @@ index 49a1017..f90401a 100644
{
HANDLE hnp;
HANDLE hFile;
@@ -2538,7 +2538,7 @@ static void test_nowait(void)
@@ -2572,7 +2572,7 @@ static void test_nowait(void)
DWORD lpmode;
hnp = CreateNamedPipeA(PIPENAME, PIPE_ACCESS_DUPLEX,
@ -33,7 +33,7 @@ index 49a1017..f90401a 100644
/* nMaxInstances */ 1,
/* nOutBufSize */ 1024,
/* nInBufSize */ 1024,
@@ -2569,7 +2569,7 @@ static void test_nowait(void)
@@ -2603,7 +2603,7 @@ static void test_nowait(void)
ok(readden == 0, "got %d bytes\n", readden);
ok(GetLastError() == ERROR_NO_DATA, "GetLastError() returned %08x, expected ERROR_NO_DATA\n", GetLastError());
@ -42,7 +42,7 @@ index 49a1017..f90401a 100644
ok(SetNamedPipeHandleState(hFile, &lpmode, NULL, NULL), "Change mode\n");
/* send message from server to client */
@@ -2593,8 +2593,18 @@ static void test_nowait(void)
@@ -2627,8 +2627,18 @@ static void test_nowait(void)
ok(WriteFile(hFile, obuf, 0, &written, NULL), "WriteFile\n");
ok(written == 0, "write file len\n");
@ -63,7 +63,7 @@ index 49a1017..f90401a 100644
readden = 0xdeadbeef;
SetLastError(0xdeadbeef);
@@ -2606,8 +2616,18 @@ static void test_nowait(void)
@@ -2640,8 +2650,18 @@ static void test_nowait(void)
ok(WriteFile(hnp, obuf, 0, &written, NULL), "WriteFile\n");
ok(written == 0, "write file len\n");
@ -84,8 +84,8 @@ index 49a1017..f90401a 100644
readden = 0xdeadbeef;
SetLastError(0xdeadbeef);
@@ -3047,7 +3067,8 @@ START_TEST(pipe)
test_CreatePipe();
@@ -3079,7 +3099,8 @@ START_TEST(pipe)
test_CloseHandle();
test_impersonation();
test_overlapped();
- test_nowait();
@ -95,10 +95,10 @@ index 49a1017..f90401a 100644
test_readfileex_pending();
}
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index ba3814e..e564bdd 100644
index ad08987..c9be586 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -495,6 +495,8 @@ static NTSTATUS read_unix_fd(int fd, char *buf, ULONG *total, ULONG length,
@@ -570,6 +570,8 @@ static NTSTATUS read_unix_fd(int fd, char *buf, ULONG *total, ULONG length,
if (ret < 0) ERR("dequeue message failed reason: %s\n", strerror(errno));
}
}
@ -108,5 +108,5 @@ index ba3814e..e564bdd 100644
result = read( fd, buf + *total, length - *total );
--
2.1.3
2.6.2

View File

@ -1,49 +1,34 @@
From 4b593f0dd46be8b51cb4e1d31efc5e16bc61cdc9 Mon Sep 17 00:00:00 2001
From 686c258580f515c706074970599fb5a081bdf06a Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 6 Jun 2015 01:21:05 +0200
Subject: server: Return correct error codes for NtWriteFile when pipes are
closed without disconnecting.
---
dlls/kernel32/tests/pipe.c | 3 ---
dlls/kernel32/tests/pipe.c | 2 +-
dlls/ntdll/file.c | 3 +++
server/named_pipe.c | 43 +++++++++++++++++++++++++++++++++++++++++--
server/protocol.def | 1 +
4 files changed, 45 insertions(+), 5 deletions(-)
4 files changed, 46 insertions(+), 3 deletions(-)
diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c
index 0fca432..4590d3c 100644
index 3035dd4..9986337 100644
--- a/dlls/kernel32/tests/pipe.c
+++ b/dlls/kernel32/tests/pipe.c
@@ -1192,7 +1192,6 @@ static void test_CloseNamedPipe(void)
@@ -1909,7 +1909,7 @@ static void test_CloseHandle(void)
SetLastError(0xdeadbeef);
ret = WriteFile(hfile, testdata, sizeof(testdata), &numbytes, NULL);
ok(!ret, "WriteFile unexpectedly succeeded\n");
- todo_wine ok(GetLastError() == ERROR_NO_DATA, "expected ERROR_NO_DATA, got %u\n", GetLastError());
+ ok(GetLastError() == ERROR_NO_DATA, "expected ERROR_NO_DATA, got %u\n", GetLastError());
SetLastError(0xdeadbeef);
ok(!WriteFile(hFile, obuf, sizeof(obuf), &written, NULL), "WriteFile() succeeded\n");
- todo_wine
ok(GetLastError() == ERROR_NO_DATA, "GetLastError() returned %08x, expected ERROR_NO_DATA\n", GetLastError());
CloseHandle(hfile);
CloseHandle(hFile);
@@ -1276,7 +1275,6 @@ static void test_CloseNamedPipe(void)
SetLastError(0xdeadbeef);
ok(!WriteFile(hnp, obuf, sizeof(obuf), &written, NULL), "WriteFile() succeeded\n");
- todo_wine
ok(GetLastError() == ERROR_NO_DATA, "GetLastError() returned %08x, expected ERROR_NO_DATA\n", GetLastError());
CloseHandle(hnp);
@@ -1314,7 +1312,6 @@ static void test_CloseNamedPipe(void)
SetLastError(0xdeadbeef);
ok(!WriteFile(hnp, obuf, sizeof(obuf), &written, NULL), "WriteFile() succeeded\n");
- todo_wine
ok(GetLastError() == ERROR_NO_DATA, "GetLastError() returned %08x, expected ERROR_NO_DATA\n", GetLastError());
CloseHandle(hnp);
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index f0d816f..26707e2 100644
index 42d1fae..3bb2905 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -1198,6 +1198,9 @@ static NTSTATUS write_unix_fd(int fd, const char *buf, ULONG *total, ULONG lengt
@@ -1213,6 +1213,9 @@ static NTSTATUS write_unix_fd(int fd, const char *buf, ULONG *total, ULONG lengt
return STATUS_SUCCESS;
else if (errno == EFAULT)
return STATUS_INVALID_USER_BUFFER;
@ -54,7 +39,7 @@ index f0d816f..26707e2 100644
}
}
diff --git a/server/named_pipe.c b/server/named_pipe.c
index cd647c4..4718d1b 100644
index 4bdb4d7..c9c08e5 100644
--- a/server/named_pipe.c
+++ b/server/named_pipe.c
@@ -144,6 +144,7 @@ static const struct object_ops named_pipe_ops =
@ -150,10 +135,10 @@ index cd647c4..4718d1b 100644
{
struct pipe_client *client = (struct pipe_client *)obj;
diff --git a/server/protocol.def b/server/protocol.def
index 428f2e0..4efda91 100644
index d0a949f..91ab8cc 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -2351,6 +2351,7 @@ enum message_type
@@ -2389,6 +2389,7 @@ enum message_type
#define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
#define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
#define NAMED_PIPE_NONBLOCKING_MODE 0x0004
@ -162,5 +147,5 @@ index 428f2e0..4efda91 100644
/* Get named pipe information by handle */
--
2.4.2
2.6.2

View File

@ -1,68 +0,0 @@
From 7939dafa125d74e832436adf2443a19f2689425e Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Fri, 5 Jun 2015 23:06:29 +0200
Subject: kernel32/tests: Add tests for behaviour of WriteFile on closed pipe.
---
dlls/kernel32/tests/pipe.c | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c
index 654d508..0fca432 100644
--- a/dlls/kernel32/tests/pipe.c
+++ b/dlls/kernel32/tests/pipe.c
@@ -1189,7 +1189,11 @@ static void test_CloseNamedPipe(void)
SetLastError(0xdeadbeef);
ok(!ReadFile(hFile, ibuf, 0, &readden, NULL), "ReadFile() succeeded\n");
ok(GetLastError() == ERROR_BROKEN_PIPE, "GetLastError() returned %08x, expected ERROR_BROKEN_PIPE\n", GetLastError());
- SetLastError(0);
+
+ SetLastError(0xdeadbeef);
+ ok(!WriteFile(hFile, obuf, sizeof(obuf), &written, NULL), "WriteFile() succeeded\n");
+ todo_wine
+ ok(GetLastError() == ERROR_NO_DATA, "GetLastError() returned %08x, expected ERROR_NO_DATA\n", GetLastError());
CloseHandle(hFile);
}
@@ -1224,7 +1228,11 @@ static void test_CloseNamedPipe(void)
ok(!ReadFile(hFile, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile() succeeded\n");
todo_wine
ok(GetLastError() == ERROR_BROKEN_PIPE, "GetLastError() returned %08x, expected ERROR_BROKEN_PIPE\n", GetLastError());
- SetLastError(0);
+
+ SetLastError(0xdeadbeef);
+ ok(!WriteFile(hFile, obuf, sizeof(obuf), &written, NULL), "WriteFile() succeeded\n");
+ todo_wine
+ ok(GetLastError() == ERROR_NO_DATA, "GetLastError() returned %08x, expected ERROR_NO_DATA\n", GetLastError());
CloseHandle(hFile);
}
@@ -1265,7 +1273,11 @@ static void test_CloseNamedPipe(void)
SetLastError(0xdeadbeef);
ok(!ReadFile(hnp, ibuf, 0, &readden, NULL), "ReadFile() succeeded\n");
ok(GetLastError() == ERROR_BROKEN_PIPE, "GetLastError() returned %08x, expected ERROR_BROKEN_PIPE\n", GetLastError());
- SetLastError(0);
+
+ SetLastError(0xdeadbeef);
+ ok(!WriteFile(hnp, obuf, sizeof(obuf), &written, NULL), "WriteFile() succeeded\n");
+ todo_wine
+ ok(GetLastError() == ERROR_NO_DATA, "GetLastError() returned %08x, expected ERROR_NO_DATA\n", GetLastError());
CloseHandle(hnp);
}
@@ -1299,7 +1311,11 @@ static void test_CloseNamedPipe(void)
SetLastError(0xdeadbeef);
ok(!ReadFile(hnp, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile() succeeded\n");
ok(GetLastError() == ERROR_BROKEN_PIPE, "GetLastError() returned %08x, expected ERROR_BROKEN_PIPE\n", GetLastError());
- SetLastError(0);
+
+ SetLastError(0xdeadbeef);
+ ok(!WriteFile(hnp, obuf, sizeof(obuf), &written, NULL), "WriteFile() succeeded\n");
+ todo_wine
+ ok(GetLastError() == ERROR_NO_DATA, "GetLastError() returned %08x, expected ERROR_NO_DATA\n", GetLastError());
CloseHandle(hnp);
}
--
2.4.2

View File

@ -1,35 +1,37 @@
From 2fc1f5ba4668fb0a33ee55118da34a43668fe169 Mon Sep 17 00:00:00 2001
From 92c0e065d3247f3a63bbf0f22d5621955779d60f Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 6 Jun 2015 01:44:20 +0200
Date: Sat, 6 Jun 2015 01:21:05 +0200
Subject: ntdll: Pre-cache file descriptors after opening a file.
---
dlls/kernel32/tests/pipe.c | 2 --
dlls/kernel32/tests/pipe.c | 4 ++--
dlls/ntdll/file.c | 12 +++++++++++-
2 files changed, 11 insertions(+), 3 deletions(-)
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c
index 146b7f7..ddad351 100644
index 9986337..fddb459 100644
--- a/dlls/kernel32/tests/pipe.c
+++ b/dlls/kernel32/tests/pipe.c
@@ -1235,12 +1235,10 @@ static void test_CloseNamedPipe(void)
@@ -1944,12 +1944,12 @@ static void test_CloseHandle(void)
SetLastError(0xdeadbeef);
ret = ReadFile(hfile, buffer, 0, &numbytes, NULL);
ok(!ret, "ReadFile unexpectedly succeeded\n");
- todo_wine ok(GetLastError() == ERROR_BROKEN_PIPE, "expected ERROR_BROKEN_PIPE, got %u\n", GetLastError());
+ ok(GetLastError() == ERROR_BROKEN_PIPE, "expected ERROR_BROKEN_PIPE, got %u\n", GetLastError());
SetLastError(0xdeadbeef);
ok(!ReadFile(hFile, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile() succeeded\n");
- todo_wine
ok(GetLastError() == ERROR_BROKEN_PIPE, "GetLastError() returned %08x, expected ERROR_BROKEN_PIPE\n", GetLastError());
SetLastError(0xdeadbeef);
ret = WriteFile(hfile, testdata, sizeof(testdata), &numbytes, NULL);
ok(!ret, "WriteFile unexpectedly succeeded\n");
- todo_wine ok(GetLastError() == ERROR_NO_DATA, "expected ERROR_NO_DATA, got %u\n", GetLastError());
+ ok(GetLastError() == ERROR_NO_DATA, "expected ERROR_NO_DATA, got %u\n", GetLastError());
SetLastError(0xdeadbeef);
ok(!WriteFile(hFile, obuf, sizeof(obuf), &written, NULL), "WriteFile() succeeded\n");
- todo_wine
ok(GetLastError() == ERROR_NO_DATA, "GetLastError() returned %08x, expected ERROR_NO_DATA\n", GetLastError());
CloseHandle(hfile);
CloseHandle(hFile);
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index ff0d306..25e9826 100644
index 3bb2905..15500b9 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -274,7 +274,17 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
@@ -209,7 +209,17 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
*handle = wine_server_ptr_handle( reply->handle );
}
SERVER_END_REQ;
@ -49,5 +51,5 @@ index ff0d306..25e9826 100644
}
--
2.4.2
2.6.2

View File

@ -1,120 +0,0 @@
From b2a17b581c4d8452a605b494f8ff7884fcb3a481 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 17 Jun 2015 13:50:59 +0200
Subject: server: Fix wineserver crash when pipe server object is destroyed
before client.
---
dlls/kernel32/tests/pipe.c | 35 +++++++++++++++++++++++++++++++++++
server/named_pipe.c | 14 ++++++++++++--
2 files changed, 47 insertions(+), 2 deletions(-)
diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c
index ddad351..06242aa 100644
--- a/dlls/kernel32/tests/pipe.c
+++ b/dlls/kernel32/tests/pipe.c
@@ -1162,6 +1162,8 @@ static void test_CloseNamedPipe(void)
char ibuf[32];
DWORD written;
DWORD readden;
+ DWORD state;
+ BOOL ret;
hnp = CreateNamedPipeA(PIPENAME, PIPE_ACCESS_DUPLEX,
PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT,
@@ -1196,6 +1198,14 @@ static void test_CloseNamedPipe(void)
ok(readden == sizeof(obuf), "got %d bytes\n", readden);
/* pipe is empty now */
+ ret = GetNamedPipeHandleStateA(hFile, &state, NULL, NULL, NULL, NULL, 0);
+ todo_wine
+ ok(ret, "GetNamedPipeHandleState failed with %d\n", GetLastError());
+ state = PIPE_READMODE_MESSAGE | PIPE_WAIT;
+ ret = SetNamedPipeHandleState(hFile, &state, NULL, NULL);
+ todo_wine
+ ok(ret, "SetNamedPipeHandleState failed with %d\n", GetLastError());
+
SetLastError(0xdeadbeef);
ok(!ReadFile(hFile, ibuf, 0, &readden, NULL), "ReadFile() succeeded\n");
ok(GetLastError() == ERROR_BROKEN_PIPE, "GetLastError() returned %08x, expected ERROR_BROKEN_PIPE\n", GetLastError());
@@ -1233,6 +1243,14 @@ static void test_CloseNamedPipe(void)
ok(readden == 0, "got %d bytes\n", readden);
/* pipe is empty now */
+ ret = GetNamedPipeHandleStateA(hFile, &state, NULL, NULL, NULL, NULL, 0);
+ todo_wine
+ ok(ret, "GetNamedPipeHandleState failed with %d\n", GetLastError());
+ state = PIPE_READMODE_MESSAGE | PIPE_WAIT;
+ ret = SetNamedPipeHandleState(hFile, &state, NULL, NULL);
+ todo_wine
+ ok(ret, "SetNamedPipeHandleState failed with %d\n", GetLastError());
+
SetLastError(0xdeadbeef);
ok(!ReadFile(hFile, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile() succeeded\n");
ok(GetLastError() == ERROR_BROKEN_PIPE, "GetLastError() returned %08x, expected ERROR_BROKEN_PIPE\n", GetLastError());
@@ -1277,6 +1295,14 @@ static void test_CloseNamedPipe(void)
ok(readden == sizeof(obuf), "got %d bytes\n", readden);
/* pipe is empty now */
+ ret = GetNamedPipeHandleStateA(hnp, &state, NULL, NULL, NULL, NULL, 0);
+ ok(ret, "GetNamedPipeHandleState failed with %d\n", GetLastError());
+ SetLastError(0xdeadbeef);
+ state = PIPE_READMODE_MESSAGE | PIPE_WAIT;
+ ret = SetNamedPipeHandleState(hFile, &state, NULL, NULL);
+ ok(!ret, "SetNamedPipeHandleState unexpectedly succeeded\n");
+ ok(GetLastError() == ERROR_INVALID_HANDLE, "GetLastError() returned %08x, expected ERROR_INVALID_HANDLE\n", GetLastError());
+
SetLastError(0xdeadbeef);
ok(!ReadFile(hnp, ibuf, 0, &readden, NULL), "ReadFile() succeeded\n");
ok(GetLastError() == ERROR_BROKEN_PIPE, "GetLastError() returned %08x, expected ERROR_BROKEN_PIPE\n", GetLastError());
@@ -1314,6 +1340,15 @@ static void test_CloseNamedPipe(void)
ok(readden == 0, "got %d bytes\n", readden);
/* pipe is empty now */
+ ret = GetNamedPipeHandleStateA(hnp, &state, NULL, NULL, NULL, NULL, 0);
+ ok(ret, "GetNamedPipeHandleState failed with %d\n", GetLastError());
+ ret = SetNamedPipeHandleState(hFile, &state, NULL, NULL);
+ SetLastError(0xdeadbeef);
+ state = PIPE_READMODE_MESSAGE | PIPE_WAIT;
+ ret = SetNamedPipeHandleState(hFile, &state, NULL, NULL);
+ ok(!ret, "SetNamedPipeHandleState unexpectedly succeeded\n");
+ ok(GetLastError() == ERROR_INVALID_HANDLE, "GetLastError() returned %08x, expected ERROR_INVALID_HANDLE\n", GetLastError());
+
SetLastError(0xdeadbeef);
ok(!ReadFile(hnp, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile() succeeded\n");
ok(GetLastError() == ERROR_BROKEN_PIPE, "GetLastError() returned %08x, expected ERROR_BROKEN_PIPE\n", GetLastError());
diff --git a/server/named_pipe.c b/server/named_pipe.c
index 4718d1b..53bec02 100644
--- a/server/named_pipe.c
+++ b/server/named_pipe.c
@@ -1105,7 +1105,12 @@ DECL_HANDLER(get_named_pipe_info)
client = (struct pipe_client *)get_handle_obj( current->process, req->handle,
0, &pipe_client_ops );
if (!client) return;
- server = client->server;
+ if (!(server = client->server))
+ {
+ release_object( client );
+ set_error( STATUS_INVALID_HANDLE );
+ return;
+ }
}
reply->flags = client ? client->pipe_flags : server->pipe_flags;
@@ -1142,7 +1147,12 @@ DECL_HANDLER(set_named_pipe_info)
client = (struct pipe_client *)get_handle_obj( current->process, req->handle,
0, &pipe_client_ops );
if (!client) return;
- server = client->server;
+ if (!(server = client->server))
+ {
+ release_object( client );
+ set_error( STATUS_INVALID_HANDLE );
+ return;
+ }
}
if ((req->flags & ~(NAMED_PIPE_MESSAGE_STREAM_READ | NAMED_PIPE_NONBLOCKING_MODE)) ||
--
2.4.3

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "b5c0c46cfc0c8590d797d8cbe08b3f0a8cfe751e"
echo "a2c6a2beb68cae239d72e012aa8d4af113b8aaa7"
}
# Show version information
@ -3571,32 +3571,28 @@ if test "$enable_kernel32_Named_Pipe" -eq 1; then
patch_apply kernel32-Named_Pipe/0002-kernel32-ConnectNamedPort-should-return-FALSE-and-se.patch
patch_apply kernel32-Named_Pipe/0003-kernel32-tests-Add-tests-for-PeekNamedPipe-with-part.patch
patch_apply kernel32-Named_Pipe/0004-kernel32-tests-Add-tests-for-sending-and-receiving-l.patch
patch_apply kernel32-Named_Pipe/0005-kernel32-tests-Add-tests-for-closing-named-pipes.patch
patch_apply kernel32-Named_Pipe/0006-server-Show-warning-if-message-mode-is-not-supported.patch
patch_apply kernel32-Named_Pipe/0007-ntdll-Unify-similar-code-in-NtReadFile-and-FILE_Asyn.patch
patch_apply kernel32-Named_Pipe/0008-ntdll-Move-logic-to-check-for-broken-pipe-into-a-sep.patch
patch_apply kernel32-Named_Pipe/0009-ntdll-Unify-similar-code-in-NtWriteFile-and-FILE_Asy.patch
patch_apply kernel32-Named_Pipe/0010-server-Use-SOCK_SEQPACKET-socket-in-combination-with.patch
patch_apply kernel32-Named_Pipe/0011-ntdll-Add-handling-for-partially-received-messages-i.patch
patch_apply kernel32-Named_Pipe/0012-kernel32-tests-Add-more-tests-with-overlapped-IO-and.patch
patch_apply kernel32-Named_Pipe/0013-ntdll-Fix-some-tests-for-overlapped-partial-reads.patch
patch_apply kernel32-Named_Pipe/0014-kernel32-tests-Test-sending-peeking-and-receiving-an.patch
patch_apply kernel32-Named_Pipe/0015-ntdll-Add-support-for-nonblocking-pipes.patch
patch_apply kernel32-Named_Pipe/0016-kernel32-tests-Add-tests-for-PIPE_NOWAIT-in-message-.patch
patch_apply kernel32-Named_Pipe/0017-ntdll-Allow-to-set-PIPE_NOWAIT-on-byte-mode-pipes.patch
patch_apply kernel32-Named_Pipe/0018-kernel32-tests-Add-additional-tests-for-PIPE_NOWAIT-.patch
patch_apply kernel32-Named_Pipe/0019-ntdll-Improve-ReadDataAvailable-handling-in-FilePipe.patch
patch_apply kernel32-Named_Pipe/0020-ntdll-Set-NamedPipeState-to-FILE_PIPE_CLOSING_STATE-.patch
patch_apply kernel32-Named_Pipe/0021-kernel32-tests-Add-tests-for-behaviour-of-WriteFile-.patch
patch_apply kernel32-Named_Pipe/0022-server-Return-correct-error-codes-for-NtWriteFile-wh.patch
patch_apply kernel32-Named_Pipe/0023-ntdll-Pre-cache-file-descriptors-after-opening-a-fil.patch
patch_apply kernel32-Named_Pipe/0024-server-Fix-wineserver-crash-when-pipe-server-object-.patch
patch_apply kernel32-Named_Pipe/0005-server-Show-warning-if-message-mode-is-not-supported.patch
patch_apply kernel32-Named_Pipe/0006-ntdll-Unify-similar-code-in-NtReadFile-and-FILE_Asyn.patch
patch_apply kernel32-Named_Pipe/0007-ntdll-Move-logic-to-check-for-broken-pipe-into-a-sep.patch
patch_apply kernel32-Named_Pipe/0008-ntdll-Unify-similar-code-in-NtWriteFile-and-FILE_Asy.patch
patch_apply kernel32-Named_Pipe/0009-server-Use-SOCK_SEQPACKET-socket-in-combination-with.patch
patch_apply kernel32-Named_Pipe/0010-ntdll-Add-handling-for-partially-received-messages-i.patch
patch_apply kernel32-Named_Pipe/0011-kernel32-tests-Add-more-tests-with-overlapped-IO-and.patch
patch_apply kernel32-Named_Pipe/0012-ntdll-Fix-some-tests-for-overlapped-partial-reads.patch
patch_apply kernel32-Named_Pipe/0013-kernel32-tests-Test-sending-peeking-and-receiving-an.patch
patch_apply kernel32-Named_Pipe/0014-ntdll-Add-support-for-nonblocking-pipes.patch
patch_apply kernel32-Named_Pipe/0015-kernel32-tests-Add-tests-for-PIPE_NOWAIT-in-message-.patch
patch_apply kernel32-Named_Pipe/0016-ntdll-Allow-to-set-PIPE_NOWAIT-on-byte-mode-pipes.patch
patch_apply kernel32-Named_Pipe/0017-kernel32-tests-Add-additional-tests-for-PIPE_NOWAIT-.patch
patch_apply kernel32-Named_Pipe/0018-ntdll-Improve-ReadDataAvailable-handling-in-FilePipe.patch
patch_apply kernel32-Named_Pipe/0019-ntdll-Set-NamedPipeState-to-FILE_PIPE_CLOSING_STATE-.patch
patch_apply kernel32-Named_Pipe/0020-server-Return-correct-error-codes-for-NtWriteFile-wh.patch
patch_apply kernel32-Named_Pipe/0021-ntdll-Pre-cache-file-descriptors-after-opening-a-fil.patch
(
echo '+ { "Sebastian Lackner", "kernel32/tests: Only allow one test result.", 1 },';
echo '+ { "Dan Kegel", "kernel32: ConnectNamedPort should return FALSE and set ERROR_PIPE_CONNECTED on success in overlapped mode.", 1 },';
echo '+ { "Sebastian Lackner", "kernel32/tests: Add tests for PeekNamedPipe with partial received messages.", 1 },';
echo '+ { "Sebastian Lackner", "kernel32/tests: Add tests for sending and receiving large messages.", 1 },';
echo '+ { "Adam Martinson", "kernel32/tests: Add tests for closing named pipes.", 1 },';
echo '+ { "Sebastian Lackner", "server: Show warning if message mode is not supported.", 1 },';
echo '+ { "Sebastian Lackner", "ntdll: Unify similar code in NtReadFile and FILE_AsyncReadService.", 1 },';
echo '+ { "Sebastian Lackner", "ntdll: Move logic to check for broken pipe into a separate function.", 1 },';
@ -3612,10 +3608,8 @@ if test "$enable_kernel32_Named_Pipe" -eq 1; then
echo '+ { "Sebastian Lackner", "kernel32/tests: Add additional tests for PIPE_NOWAIT in overlapped mode.", 1 },';
echo '+ { "Qian Hong", "ntdll: Improve ReadDataAvailable handling in FilePipeLocalInformation class support.", 1 },';
echo '+ { "Sebastian Lackner", "ntdll: Set NamedPipeState to FILE_PIPE_CLOSING_STATE on broken pipe in NtQueryInformationFile.", 1 },';
echo '+ { "Sebastian Lackner", "kernel32/tests: Add tests for behaviour of WriteFile on closed pipe.", 1 },';
echo '+ { "Sebastian Lackner", "server: Return correct error codes for NtWriteFile when pipes are closed without disconnecting.", 1 },';
echo '+ { "Sebastian Lackner", "ntdll: Pre-cache file descriptors after opening a file.", 1 },';
echo '+ { "Sebastian Lackner", "server: Fix wineserver crash when pipe server object is destroyed before client.", 1 },';
) >> "$patchlist"
fi