Module: wine Branch: master Commit: 741b8f95047b8dad69598501b08bf8a09104574e URL: https://source.winehq.org/git/wine.git/?a=commit;h=741b8f95047b8dad69598501b...
Author: Zebediah Figura z.figura12@gmail.com Date: Tue Dec 31 16:37:34 2019 -0600
kernel32/tests: Fix a test failure on Windows 10.
Signed-off-by: Zebediah Figura z.figura12@gmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
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 952c1054c8..120e9f16f0 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());