Commit 741b8f95 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

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

parent 456392f3
...@@ -122,7 +122,10 @@ static void test_VirtualAllocEx(void) ...@@ -122,7 +122,10 @@ static void test_VirtualAllocEx(void)
ok( bytes_written == 0, "%lu bytes written\n", bytes_written ); ok( bytes_written == 0, "%lu bytes written\n", bytes_written );
b = ReadProcessMemory(hProcess, addr1, src, alloc_size, &bytes_read); b = ReadProcessMemory(hProcess, addr1, src, alloc_size, &bytes_read);
ok( !b, "ReadProcessMemory succeeded\n" ); ok( !b, "ReadProcessMemory succeeded\n" );
ok( GetLastError() == ERROR_NOACCESS, "wrong error %u\n", GetLastError() ); 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 ); ok( bytes_read == 0, "%lu bytes written\n", bytes_read );
b = VirtualProtect( src, 0x2000, PAGE_NOACCESS, &old_prot ); b = VirtualProtect( src, 0x2000, PAGE_NOACCESS, &old_prot );
...@@ -135,7 +138,10 @@ static void test_VirtualAllocEx(void) ...@@ -135,7 +138,10 @@ static void test_VirtualAllocEx(void)
ok( bytes_written == 0, "%lu bytes written\n", bytes_written ); ok( bytes_written == 0, "%lu bytes written\n", bytes_written );
b = ReadProcessMemory(hProcess, addr1, src, alloc_size, &bytes_read); b = ReadProcessMemory(hProcess, addr1, src, alloc_size, &bytes_read);
ok( !b, "ReadProcessMemory succeeded\n" ); ok( !b, "ReadProcessMemory succeeded\n" );
ok( GetLastError() == ERROR_NOACCESS, "wrong error %u\n", GetLastError() ); 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 ); ok( bytes_read == 0, "%lu bytes written\n", bytes_read );
b = pVirtualFreeEx(hProcess, addr1, 0, MEM_RELEASE); b = pVirtualFreeEx(hProcess, addr1, 0, MEM_RELEASE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment