Sebastian Lackner : kernel32/tests: Ensure that pipe tests read the full pipe content.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Sep 4 14:48:40 CDT 2014


Module: wine
Branch: master
Commit: 36debbe80f5388b5dd08955bbeabc3da0e8caf1e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=36debbe80f5388b5dd08955bbeabc3da0e8caf1e

Author: Sebastian Lackner <sebastian at fds-team.de>
Date:   Thu Sep  4 17:10:45 2014 +0200

kernel32/tests: Ensure that pipe tests read the full pipe content.

---

 dlls/kernel32/tests/pipe.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c
index 157dc53..832b980 100644
--- a/dlls/kernel32/tests/pipe.c
+++ b/dlls/kernel32/tests/pipe.c
@@ -251,7 +251,9 @@ static void test_CreateNamedPipe(int pipemode)
             }
             pbuf = ibuf;
             ok(memcmp(obuf, pbuf, sizeof(obuf)) == 0, "content 5a check\n");
-    
+            if (readden <= sizeof(obuf))
+                ok(ReadFile(hFile, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile\n");
+
             /* Multiple writes in the reverse direction */
             /* the write of obuf2 from write4 should still be in the buffer */
             ok(PeekNamedPipe(hnp, ibuf, sizeof(ibuf), &readden, &avail, NULL), "Peek6a\n");
@@ -281,6 +283,8 @@ static void test_CreateNamedPipe(int pipemode)
             }
             pbuf = ibuf;
             ok(memcmp(obuf, pbuf, sizeof(obuf)) == 0, "content 6a check\n");
+            if (readden <= sizeof(obuf))
+                ok(ReadFile(hnp, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile\n");
         }
 
         /* Picky conformance tests */




More information about the wine-cvs mailing list