Rémi Bernon : kernel32/tests: Tweak tests results for w7pro64.

Alexandre Julliard julliard at winehq.org
Tue Apr 19 16:20:14 CDT 2022


Module: wine
Branch: master
Commit: af6dd8eb0c84287553ea982bd93f1f43f6aa13c0
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=af6dd8eb0c84287553ea982bd93f1f43f6aa13c0

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Tue Apr 19 19:33:29 2022 +0200

kernel32/tests: Tweak tests results for w7pro64.

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/kernel32/tests/heap.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/dlls/kernel32/tests/heap.c b/dlls/kernel32/tests/heap.c
index 53cff284c6f..a131a7f56e0 100644
--- a/dlls/kernel32/tests/heap.c
+++ b/dlls/kernel32/tests/heap.c
@@ -328,10 +328,12 @@ static void test_HeapCreate(void)
     ok( !!heap, "HeapCreate failed, error %lu\n", GetLastError() );
     ok( !((ULONG_PTR)heap & 0xffff), "wrong heap alignment\n" );
 
-    ptr = HeapAlloc( heap, 0, alloc_size - (0x400 + 0x80 * sizeof(void *)) );
+    /* theshold between failure and success varies, and w7pro64 has a much larger overhead. */
+
+    ptr = HeapAlloc( heap, 0, alloc_size - (0x400 + 0x100 * sizeof(void *)) );
     ok( !!ptr, "HeapAlloc failed, error %lu\n", GetLastError() );
     size = HeapSize( heap, 0, ptr );
-    ok( size == alloc_size - (0x400 + 0x80 * sizeof(void *)),
+    ok( size == alloc_size - (0x400 + 0x100 * sizeof(void *)),
         "HeapSize returned %#Ix, error %lu\n", size, GetLastError() );
     ret = HeapFree( heap, 0, ptr );
     ok( ret, "HeapFree failed, error %lu\n", GetLastError() );
@@ -438,7 +440,7 @@ static void test_HeapCreate(void)
         "got Region.dwCommittedSize %#lx\n", entries[0].Region.dwCommittedSize );
     todo_wine
     ok( entries[0].Region.dwUnCommittedSize == 0x10000 - entries[0].Region.dwCommittedSize ||
-        entries[0].Region.dwUnCommittedSize == 0x40000 - entries[0].Region.dwCommittedSize /* win7 */,
+        entries[0].Region.dwUnCommittedSize == 0x10000 * sizeof(void *) - entries[0].Region.dwCommittedSize /* win7 */,
         "got Region.dwUnCommittedSize %#lx\n", entries[0].Region.dwUnCommittedSize );
     todo_wine
     ok( (BYTE *)entries[0].Region.lpFirstBlock == (BYTE *)entries[0].lpData + entries[0].cbData + 2 * sizeof(void *) ||
@@ -493,7 +495,7 @@ static void test_HeapCreate(void)
     ok( entries[3].lpData == ptr, "got lpData %p\n", entries[3].lpData );
     todo_wine
     ok( entries[3].cbData == 5 * alloc_size, "got cbData %#lx\n", entries[3].cbData );
-    ok( entries[3].cbOverhead == 0 || entries[3].cbOverhead == 0x20 /* win7 */,
+    ok( entries[3].cbOverhead == 0 || entries[3].cbOverhead == 8 * sizeof(void *) /* win7 */,
         "got cbOverhead %#x\n", entries[3].cbOverhead );
     todo_wine
     ok( entries[3].iRegionIndex == 64, "got iRegionIndex %d\n", entries[3].iRegionIndex );
@@ -520,7 +522,7 @@ static void test_HeapCreate(void)
     ok( entries[4].lpData == ptr1, "got lpData %p\n", entries[4].lpData );
     todo_wine
     ok( entries[4].cbData == 5 * alloc_size, "got cbData %#lx\n", entries[4].cbData );
-    ok( entries[4].cbOverhead == 0 || entries[4].cbOverhead == 0x20 /* win7 */,
+    ok( entries[4].cbOverhead == 0 || entries[4].cbOverhead == 8 * sizeof(void *) /* win7 */,
         "got cbOverhead %#x\n", entries[4].cbOverhead );
     todo_wine
     ok( entries[4].iRegionIndex == 64, "got iRegionIndex %d\n", entries[4].iRegionIndex );




More information about the wine-cvs mailing list