kernel32-Named_Pipe: Fix warnings in tests on x86_64.

This commit is contained in:
Sebastian Lackner 2015-01-24 08:49:33 +01:00
parent 8cf7585f01
commit c85677af86

View File

@ -1,4 +1,4 @@
From c0f999092e3f10053fb710d7f2ab134f9fdea592 Mon Sep 17 00:00:00 2001
From 3bbdd942918050d538375e8ef4655101359fab88 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 17 Aug 2014 02:56:57 +0200
Subject: kernel32/tests: Add additional tests for PIPE_NOWAIT in overlapped
@ -9,10 +9,10 @@ Subject: kernel32/tests: Add additional tests for PIPE_NOWAIT in overlapped
1 file changed, 294 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c
index f90401a..2107294 100644
index 00840e6..f9354c6 100644
--- a/dlls/kernel32/tests/pipe.c
+++ b/dlls/kernel32/tests/pipe.c
@@ -2747,7 +2747,7 @@ static void test_readfileex_pending(void)
@@ -2748,7 +2748,7 @@ static void test_readfileex_pending(void)
{
HANDLE server, client, event;
BOOL ret;
@ -21,7 +21,7 @@ index f90401a..2107294 100644
OVERLAPPED overlapped;
char read_buf[1024];
char write_buf[1024];
@@ -2905,6 +2905,160 @@ todo_wine
@@ -2906,6 +2906,160 @@ todo_wine
CloseHandle(client);
CloseHandle(server);
@ -169,11 +169,11 @@ index f90401a..2107294 100644
+ ok(ret == TRUE, "ReadFile failed, err=%i\n", GetLastError());
+ ok(num_bytes == strlen(long_test_string), "bytes %u\n", num_bytes);
+ ok((NTSTATUS)overlapped.Internal == 0, "expected 0, got %#lx\n", overlapped.Internal);
+ ok(overlapped.InternalHigh == strlen(long_test_string), "expected %d, got %lu\n", strlen(long_test_string), overlapped.InternalHigh);
+ ok(overlapped.InternalHigh == strlen(long_test_string), "expected %u, got %lu\n", (DWORD)strlen(long_test_string), overlapped.InternalHigh);
+ wait = WaitForSingleObject(event, 100);
+ ok(wait == WAIT_IO_COMPLETION || wait == WAIT_OBJECT_0, "WaitForSingleObject returned %x\n", wait);
+ ok((NTSTATUS)overlapped.Internal == 0, "expected 0, got %#lx\n", overlapped.Internal);
+ ok(overlapped.InternalHigh == strlen(long_test_string), "expected %d, got %lu\n", strlen(long_test_string), overlapped.InternalHigh);
+ ok(overlapped.InternalHigh == strlen(long_test_string), "expected %u, got %lu\n", (DWORD)strlen(long_test_string), overlapped.InternalHigh);
+ ok(!memcmp(long_test_string, read_buf, strlen(long_test_string)), "ReadFile read wrong bytes\n");
+
+ CloseHandle(client);
@ -182,7 +182,7 @@ index f90401a..2107294 100644
server = CreateNamedPipeA(PIPENAME, FILE_FLAG_OVERLAPPED | PIPE_ACCESS_DUPLEX,
/* dwOpenMode */ PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT,
/* nMaxInstances */ 1,
@@ -3043,6 +3197,145 @@ todo_wine
@@ -3044,6 +3198,145 @@ todo_wine
ok(num_bytes == strlen(long_test_string)-4, "ReadFile returned only %d bytes\n", num_bytes);
ok(!memcmp(long_test_string, read_buf, strlen(long_test_string)), "ReadFile read wrong bytes\n");
@ -318,16 +318,16 @@ index f90401a..2107294 100644
+ ok(ret == TRUE, "ReadFile failed, err=%i\n", GetLastError());
+ ok(num_bytes == strlen(long_test_string), "bytes %u\n", num_bytes);
+ ok((NTSTATUS)overlapped.Internal == 0, "expected 0, got %#lx\n", overlapped.Internal);
+ ok(overlapped.InternalHigh == strlen(long_test_string), "expected %d, got %lu\n", strlen(long_test_string), overlapped.InternalHigh);
+ ok(overlapped.InternalHigh == strlen(long_test_string), "expected %u, got %lu\n", (DWORD)strlen(long_test_string), overlapped.InternalHigh);
+ wait = WaitForSingleObject(event, 100);
+ ok(wait == WAIT_IO_COMPLETION || wait == WAIT_OBJECT_0, "WaitForSingleObject returned %x\n", wait);
+ ok((NTSTATUS)overlapped.Internal == 0, "expected 0, got %#lx\n", overlapped.Internal);
+ ok(overlapped.InternalHigh == strlen(long_test_string), "expected %d, got %lu\n", strlen(long_test_string), overlapped.InternalHigh);
+ ok(overlapped.InternalHigh == strlen(long_test_string), "expected %u, got %lu\n", (DWORD)strlen(long_test_string), overlapped.InternalHigh);
+ ok(!memcmp(long_test_string, read_buf, strlen(long_test_string)), "ReadFile read wrong bytes\n");
+
CloseHandle(client);
CloseHandle(server);
CloseHandle(event);
--
2.1.3
2.2.1