From 741b8f95047b8dad69598501b08bf8a09104574e Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Tue, 31 Dec 2019 16:37:34 -0600 Subject: [PATCH] kernel32/tests: Fix a test failure on Windows 10. Signed-off-by: Zebediah Figura Signed-off-by: Alexandre Julliard --- 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());