Module: wine Branch: master Commit: a21c93cde6015792c888e6a8a69c98c7183fc9c5 URL: https://source.winehq.org/git/wine.git/?a=commit;h=a21c93cde6015792c888e6a8a...
Author: Rémi Bernon rbernon@codeweavers.com Date: Thu May 5 10:32:43 2022 +0200
kernel32/tests: Check that HeapCreate should ignore checking flags.
Signed-off-by: Rémi Bernon rbernon@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/kernel32/tests/heap.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/dlls/kernel32/tests/heap.c b/dlls/kernel32/tests/heap.c index 4f808c8c7e6..f437a13a63e 100644 --- a/dlls/kernel32/tests/heap.c +++ b/dlls/kernel32/tests/heap.c @@ -2435,7 +2435,9 @@ static void test_heap_layout( HANDLE handle, DWORD global_flag, DWORD heap_flags if (global_flag & FLG_HEAP_ENABLE_TAGGING) heap_flags |= HEAP_SHARED; if (!(global_flag & FLG_HEAP_PAGE_ALLOCS)) force_flags &= ~(HEAP_GROWABLE|HEAP_PRIVATE);
+ todo_wine_if( (heap->force_flags & ~heap_flags) & (HEAP_TAIL_CHECKING_ENABLED|HEAP_FREE_CHECKING_ENABLED) ) ok( heap->force_flags == force_flags, "got force_flags %#x\n", heap->force_flags ); + todo_wine_if( (heap->flags & ~heap_flags) & (HEAP_TAIL_CHECKING_ENABLED|HEAP_FREE_CHECKING_ENABLED) ) ok( heap->flags == heap_flags, "got flags %#x\n", heap->flags );
if (heap->flags & HEAP_PAGE_ALLOCS) @@ -2508,6 +2510,12 @@ static void test_child_heap( const char *arg ) ret = HeapDestroy( heap ); ok( ret, "HeapDestroy failed, error %lu\n", GetLastError() );
+ heap = HeapCreate( HEAP_TAIL_CHECKING_ENABLED|HEAP_FREE_CHECKING_ENABLED|HEAP_NO_SERIALIZE, 0, 0 ); + ok( heap != GetProcessHeap(), "got unexpected heap\n" ); + test_heap_layout( heap, global_flags, heap_flags|HEAP_NO_SERIALIZE|HEAP_GROWABLE|HEAP_PRIVATE ); + ret = HeapDestroy( heap ); + ok( ret, "HeapDestroy failed, error %lu\n", GetLastError() ); + heap = HeapCreate( 0, 0x1000, 0x10000 ); ok( heap != GetProcessHeap(), "got unexpected heap\n" ); test_heap_layout( heap, global_flags, heap_flags|HEAP_PRIVATE );