Author: spetreolle Date: Mon Feb 27 20:19:21 2012 New Revision: 55890
URL: http://svn.reactos.org/svn/reactos?rev=55890&view=rev Log: [KERNEL32_WINETEST] Addendum to 55888: allow to run MEM_RESET tests in interactive mode.
Modified: trunk/rostests/winetests/kernel32/virtual.c
Modified: trunk/rostests/winetests/kernel32/virtual.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/virtual... ============================================================================== --- trunk/rostests/winetests/kernel32/virtual.c [iso-8859-1] (original) +++ trunk/rostests/winetests/kernel32/virtual.c [iso-8859-1] Mon Feb 27 20:19:21 2012 @@ -298,8 +298,8 @@ memset( addr1, 0x55, 20 ); ok( *(DWORD *)addr1 == 0x55555555, "wrong data %x\n", *(DWORD *)addr1 );
- skip("MEM_RESET is not currently supported\n"); -#if 0 +if(winetest_interactive) +{ addr2 = VirtualAlloc( addr1, 0x1000, MEM_RESET, PAGE_NOACCESS ); ok( addr2 == addr1 || broken( !addr2 && GetLastError() == ERROR_INVALID_PARAMETER), /* win9x */ "VirtualAlloc failed err %u\n", GetLastError() ); @@ -325,7 +325,10 @@ ok( !addr2, "VirtualAlloc failed\n" ); ok( GetLastError() == ERROR_INVALID_ADDRESS, "wrong error %u\n", GetLastError() ); } -#endif +} +else + skip("MEM_RESET is not currently supported\n"); + /* invalid protection values */ SetLastError(0xdeadbeef); addr2 = VirtualAlloc(NULL, 0x1000, MEM_RESERVE, 0); @@ -742,8 +745,8 @@ ok(info.Type == MEM_MAPPED, "Type should have been MEM_MAPPED instead of 0x%x\n", info.Type); }
- skip("MEM_RESET is not currently supported\n"); -#if 0 +if(winetest_interactive) +{ addr = VirtualAlloc( ptr, MAPPING_SIZE, MEM_RESET, PAGE_READONLY ); ok( addr == ptr || broken(!addr && GetLastError() == ERROR_INVALID_PARAMETER), /* win9x */ "VirtualAlloc failed with error %u\n", GetLastError() ); @@ -752,7 +755,9 @@ ok( !ret || broken(ret) /* win9x */, "VirtualFree succeeded\n" ); if (!ret) ok( GetLastError() == ERROR_INVALID_PARAMETER, "VirtualFree failed with %u\n", GetLastError() ); -#endif +} +else + skip("MEM_RESET is not currently supported\n");
ret = UnmapViewOfFile(ptr2); ok(ret, "UnmapViewOfFile failed with error %d\n", GetLastError()); @@ -1089,8 +1094,6 @@
static void test_write_watch(void) { - skip("test_write_watch - MEM_WRITE_WATCH is currently not supported\n"); -#if 0 char *base; DWORD ret, size, old_prot; MEMORY_BASIC_INFORMATION info; @@ -1387,7 +1390,6 @@ if (count) ok( results[0] == base + 5*pagesize, "wrong result %p\n", results[0] );
VirtualFree( base, 0, MEM_FREE ); -#endif }
START_TEST(virtual) @@ -1435,5 +1437,8 @@ test_IsBadReadPtr(); test_IsBadWritePtr(); test_IsBadCodePtr(); - test_write_watch(); + if(winetest_interactive) + test_write_watch(); + else + skip("test_write_watch - MEM_WRITE_WATCH is currently not supported\n"); }