-- v2: DEBUG kernel32:heap: Trace the GlobalMemoryStatus() results for the GitLab CI failures. HACK winetest: Hardcode which test to run.
From: Francois Gouget fgouget@codeweavers.com
--- programs/winetest/main.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/programs/winetest/main.c b/programs/winetest/main.c index 18fa25db101..43696de7f16 100644 --- a/programs/winetest/main.c +++ b/programs/winetest/main.c @@ -1452,6 +1452,9 @@ int __cdecl main( int argc, char *argv[] ) exit (2); } } + if (!nb_filters) + add_filter( "kernel32:heap" ); + if (submit) { if (tag) report (R_WARNING, "ignoring tag for submission");
From: Francois Gouget fgouget@codeweavers.com
Also repeat the test to increase the chance of a failure. --- dlls/kernel32/tests/heap.c | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-)
diff --git a/dlls/kernel32/tests/heap.c b/dlls/kernel32/tests/heap.c index a81cb1b7a15..a36df058afb 100644 --- a/dlls/kernel32/tests/heap.c +++ b/dlls/kernel32/tests/heap.c @@ -3549,6 +3549,7 @@ static void test_GlobalMemoryStatus(void) VM_COUNTERS_EX vmc; NTSTATUS status; BOOL ret; + static BOOL first = 1;
SetLastError( 0xdeadbeef ); ret = GlobalMemoryStatusEx( &memex ); @@ -3590,13 +3591,24 @@ static void test_GlobalMemoryStatus(void) /* allow some variability, info sources are not always in sync */ #define IS_WITHIN_RANGE(a, b) (((a) - (b) + (256 * basic_info.PageSize)) <= (512 * basic_info.PageSize))
+#ifndef PRId64 +#define PRId64 "#I64d" +#endif + if (first) + printf("PageSize = %ld -> %ld - %ld\n", basic_info.PageSize, 256 * basic_info.PageSize, 512 * basic_info.PageSize); + printf("memex-expect: Phys: %" PRId64 " - %" PRId64 " = %" PRId64 " / %" PRId64 " - %" PRId64 " = %" PRId64 " PageFile %" PRId64 " - %" PRId64 " = %" PRId64 " / %" PRId64 " - %" PRId64 " = %" PRId64 "\n", + memex.ullAvailPhys, expect.ullAvailPhys, memex.ullAvailPhys - expect.ullAvailPhys, + memex.ullTotalPhys, expect.ullTotalPhys, memex.ullTotalPhys - expect.ullTotalPhys, + memex.ullAvailPageFile, expect.ullAvailPageFile, memex.ullAvailPageFile - expect.ullAvailPageFile, + memex.ullTotalPageFile, expect.ullTotalPageFile, memex.ullTotalPageFile - expect.ullTotalPageFile ); + ok( memex.dwMemoryLoad == expect.dwMemoryLoad, "got dwMemoryLoad %lu\n", memex.dwMemoryLoad ); - ok( memex.ullTotalPhys == expect.ullTotalPhys, "got ullTotalPhys %#I64x\n", memex.ullTotalPhys ); - ok( IS_WITHIN_RANGE( memex.ullAvailPhys, expect.ullAvailPhys ), "got ullAvailPhys %#I64x\n", memex.ullAvailPhys ); - ok( memex.ullTotalPageFile == expect.ullTotalPageFile, "got ullTotalPageFile %#I64x\n", memex.ullTotalPageFile ); - ok( IS_WITHIN_RANGE( memex.ullAvailPageFile, expect.ullAvailPageFile ), "got ullAvailPageFile %#I64x\n", memex.ullAvailPageFile ); - ok( memex.ullTotalVirtual == expect.ullTotalVirtual, "got ullTotalVirtual %#I64x\n", memex.ullTotalVirtual ); - ok( memex.ullAvailVirtual <= expect.ullAvailVirtual, "got ullAvailVirtual %#I64x\n", memex.ullAvailVirtual ); + ok( memex.ullTotalPhys == expect.ullTotalPhys, "got ullTotalPhys %#I64x, expected %#I64x\n", memex.ullTotalPhys, expect.ullTotalPhys ); + ok( IS_WITHIN_RANGE( memex.ullAvailPhys, expect.ullAvailPhys ), "got ullAvailPhys %#I64x, expected %#I64x\n", memex.ullAvailPhys, expect.ullAvailPhys ); + ok( memex.ullTotalPageFile == expect.ullTotalPageFile, "got ullTotalPageFile %#I64x, expected %#I64x\n", memex.ullTotalPageFile, expect.ullTotalPageFile ); + ok( IS_WITHIN_RANGE( memex.ullAvailPageFile, expect.ullAvailPageFile ), "got ullAvailPageFile %#I64x, expected %#I64x\n", memex.ullAvailPageFile, expect.ullAvailPageFile ); + ok( memex.ullTotalVirtual == expect.ullTotalVirtual, "got ullTotalVirtual %#I64x, expected %#I64x\n", memex.ullTotalVirtual, expect.ullTotalVirtual ); + ok( memex.ullAvailVirtual <= expect.ullAvailVirtual, "got ullAvailVirtual %#I64x, expected %#I64x\n", memex.ullAvailVirtual, expect.ullAvailVirtual ); ok( memex.ullAvailExtendedVirtual == 0, "got ullAvailExtendedVirtual %#I64x\n", memex.ullAvailExtendedVirtual );
ok( mem.dwMemoryLoad == memex.dwMemoryLoad, "got dwMemoryLoad %lu\n", mem.dwMemoryLoad ); @@ -3621,6 +3633,7 @@ START_TEST(heap) { int argc; char **argv; + int i;
load_functions();
@@ -3631,13 +3644,20 @@ START_TEST(heap) return; }
+ if (0) { test_HeapCreate(); test_GlobalAlloc(); test_LocalAlloc();
test_GetPhysicallyInstalledSystemMemory(); - test_GlobalMemoryStatus(); + } + for (i = 0; i < 20; i++) + { + test_GlobalMemoryStatus(); + Sleep(1000); + }
+ if (0) { if (pRtlGetNtGlobalFlags) { test_debug_heap( argv[0], 0 ); @@ -3653,4 +3673,5 @@ START_TEST(heap) test_debug_heap( argv[0], 0xdeadbeef ); } else win_skip( "RtlGetNtGlobalFlags not found, skipping heap debug tests\n" ); + } }
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=129456
Your paranoid android.
=== debian11 (32 bit report) ===
kernel32: heap.c:3607: Test failed: got ullAvailPhys 0x14c82c000, expected 0x14cc6c000 heap.c:3609: Test failed: got ullAvailPageFile 0x17d694000, expected 0x17dad4000
=== debian11 (32 bit ar:MA report) ===
kernel32: heap.c:3607: Test failed: got ullAvailPhys 0x14c324000, expected 0x14c623000 heap.c:3609: Test failed: got ullAvailPageFile 0x17d2cc000, expected 0x17d5cb000
=== debian11 (32 bit de report) ===
kernel32: heap.c:3607: Test failed: got ullAvailPhys 0x14ca9e000, expected 0x14d079000 heap.c:3609: Test failed: got ullAvailPageFile 0x17da46000, expected 0x17e021000
=== debian11 (32 bit fr report) ===
kernel32: heap.c:3607: Test failed: got ullAvailPhys 0x14ce90000, expected 0x14d226000 heap.c:3609: Test failed: got ullAvailPageFile 0x17de38000, expected 0x17e1ce000
=== debian11 (32 bit he:IL report) ===
kernel32: heap.c:3607: Test failed: got ullAvailPhys 0x14cd69000, expected 0x14d0fb000 heap.c:3609: Test failed: got ullAvailPageFile 0x17dd11000, expected 0x17e0a3000
=== debian11 (32 bit hi:IN report) ===
kernel32: heap.c:3607: Test failed: got ullAvailPhys 0x14cbcd000, expected 0x14cf6e000 heap.c:3609: Test failed: got ullAvailPageFile 0x17db75000, expected 0x17df16000
=== debian11 (32 bit ja:JP report) ===
kernel32: heap.c:3607: Test failed: got ullAvailPhys 0x14cd29000, expected 0x14cf88000 heap.c:3609: Test failed: got ullAvailPageFile 0x17de51000, expected 0x17e0b0000
=== debian11b (64 bit WoW report) ===
kernel32: heap.c:3607: Test failed: got ullAvailPhys 0x14b3fc000, expected 0x14b5e4000 heap.c:3609: Test failed: got ullAvailPageFile 0x17a606000, expected 0x17a7ee000