[PATCH] kernel32/tests: Fix a test failure on Windows 10.

Zebediah Figura z.figura12 at gmail.com
Tue Dec 31 16:37:34 CST 2019


Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 dlls/kernel32/tests/virtual.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c
index 952c1054c83..120e9f16f02 100644
--- a/dlls/kernel32/tests/virtual.c
+++ b/dlls/kernel32/tests/virtual.c
@@ -122,8 +122,11 @@ static void test_VirtualAllocEx(void)
     ok( bytes_written == 0, "%lu bytes written\n", bytes_written );
     b = ReadProcessMemory(hProcess, addr1, src, alloc_size, &bytes_read);
     ok( !b, "ReadProcessMemory succeeded\n" );
-    ok( GetLastError() == ERROR_NOACCESS, "wrong error %u\n", GetLastError() );
-    ok( bytes_read == 0, "%lu bytes written\n", bytes_read );
+    ok( GetLastError() == ERROR_NOACCESS ||
+        GetLastError() == ERROR_PARTIAL_COPY, /* win10 v1607+ */
+        "wrong error %u\n", GetLastError() );
+    if (GetLastError() == ERROR_NOACCESS)
+        ok( bytes_read == 0, "%lu bytes written\n", bytes_read );
 
     b = VirtualProtect( src, 0x2000, PAGE_NOACCESS, &old_prot );
     ok( b, "VirtualProtect failed error %u\n", GetLastError() );
@@ -135,8 +138,11 @@ static void test_VirtualAllocEx(void)
     ok( bytes_written == 0, "%lu bytes written\n", bytes_written );
     b = ReadProcessMemory(hProcess, addr1, src, alloc_size, &bytes_read);
     ok( !b, "ReadProcessMemory succeeded\n" );
-    ok( GetLastError() == ERROR_NOACCESS, "wrong error %u\n", GetLastError() );
-    ok( bytes_read == 0, "%lu bytes written\n", bytes_read );
+    ok( GetLastError() == ERROR_NOACCESS ||
+        GetLastError() == ERROR_PARTIAL_COPY, /* win10 v1607+ */
+        "wrong error %u\n", GetLastError() );
+    if (GetLastError() == ERROR_NOACCESS)
+        ok( bytes_read == 0, "%lu bytes written\n", bytes_read );
 
     b = pVirtualFreeEx(hProcess, addr1, 0, MEM_RELEASE);
     ok(b != 0, "VirtualFreeEx, error %u\n", GetLastError());
-- 
2.24.0




More information about the wine-devel mailing list