[PATCH v3 0/2] MR2213: Draft: Debug GitLab's kernel32:heap failures in test_GlobalMemoryStatus()
-- v3: DEBUG kernel32:heap: Trace the GlobalMemoryStatus() results for the GitLab CI failures. https://gitlab.winehq.org/wine/wine/-/merge_requests/2213
From: Francois Gouget <fgouget(a)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"); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/2213
From: Francois Gouget <fgouget(a)codeweavers.com> Also repeat the test to increase the chance of a failure. --- dlls/kernel32/tests/heap.c | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/dlls/kernel32/tests/heap.c b/dlls/kernel32/tests/heap.c index a81cb1b7a15..ea7ff0079e6 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 = TRUE; SetLastError( 0xdeadbeef ); ret = GlobalMemoryStatusEx( &memex ); @@ -3590,13 +3591,22 @@ 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)) + if (first) + printf("PageSize = %ld -> %ld - %ld\n", basic_info.PageSize, 256 * basic_info.PageSize, 512 * basic_info.PageSize); + first = FALSE; + printf("memex-expect: Phys: %#I64x - %#I64x = %ld / %#I64x - %#I64x = %ld PageFile %#I64x - %#I64x = %ld / %#I64x - %#I64x = %ld\n", + memex.ullAvailPhys, expect.ullAvailPhys, (LONG)(memex.ullAvailPhys - expect.ullAvailPhys), + memex.ullTotalPhys, expect.ullTotalPhys, (LONG)(memex.ullTotalPhys - expect.ullTotalPhys), + memex.ullAvailPageFile, expect.ullAvailPageFile, (LONG)(memex.ullAvailPageFile - expect.ullAvailPageFile), + memex.ullTotalPageFile, expect.ullTotalPageFile, (LONG)(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 +3631,7 @@ START_TEST(heap) { int argc; char **argv; + int i; load_functions(); @@ -3631,13 +3642,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 +3671,5 @@ START_TEST(heap) test_debug_heap( argv[0], 0xdeadbeef ); } else win_skip( "RtlGetNtGlobalFlags not found, skipping heap debug tests\n" ); + } } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/2213
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=129458 Your paranoid android. === debian11 (32 bit report) === kernel32: heap.c:3605: Test failed: got ullAvailPhys 0x14cb3c000, expected 0x14cf7f000 heap.c:3607: Test failed: got ullAvailPageFile 0x17d964000, expected 0x17dda7000 === debian11 (32 bit ar:MA report) === kernel32: heap.c:3605: Test failed: got ullAvailPhys 0x14c678000, expected 0x14c84c000 heap.c:3607: Test failed: got ullAvailPageFile 0x17d5e0000, expected 0x17d7b4000 heap.c:3605: Test failed: got ullAvailPhys 0x14c84c000, expected 0x14cbc8000 heap.c:3607: Test failed: got ullAvailPageFile 0x17d7b4000, expected 0x17db30000 === debian11 (32 bit de report) === kernel32: heap.c:3605: Test failed: got ullAvailPhys 0x14c96a000, expected 0x14cd02000 heap.c:3607: Test failed: got ullAvailPageFile 0x17d8d2000, expected 0x17dc6a000 === debian11 (32 bit fr report) === kernel32: heap.c:3605: Test failed: got ullAvailPhys 0x14ce46000, expected 0x14d09a000 heap.c:3607: Test failed: got ullAvailPageFile 0x17ddae000, expected 0x17e002000 === debian11 (32 bit he:IL report) === kernel32: heap.c:3605: Test failed: got ullAvailPhys 0x14cdd9000, expected 0x14d22c000 heap.c:3607: Test failed: got ullAvailPageFile 0x17dd41000, expected 0x17e194000 === debian11 (32 bit hi:IN report) === kernel32: heap.c:3605: Test failed: got ullAvailPhys 0x14d489000, expected 0x14d766000 heap.c:3607: Test failed: got ullAvailPageFile 0x17e3f1000, expected 0x17e6ce000 === debian11 (32 bit ja:JP report) === kernel32: heap.c:3605: Test failed: got ullAvailPhys 0x14ca45000, expected 0x14cce8000 heap.c:3607: Test failed: got ullAvailPageFile 0x17db2d000, expected 0x17ddd0000 === debian11 (32 bit zh:CN report) === kernel32: heap.c:3605: Test failed: got ullAvailPhys 0x14c8a9000, expected 0x14cc9d000 heap.c:3607: Test failed: got ullAvailPageFile 0x17d991000, expected 0x17dd85000 === debian11b (32 bit WoW report) === kernel32: heap.c:3605: Test failed: got ullAvailPhys 0x14b19e000, expected 0x14b421000 heap.c:3607: Test failed: got ullAvailPageFile 0x17a368000, expected 0x17a5eb000 heap.c:3605: Test failed: got ullAvailPhys 0x14b477000, expected 0x14b5fc000 heap.c:3607: Test failed: got ullAvailPageFile 0x17a641000, expected 0x17a7c6000 === debian11b (64 bit WoW report) === kernel32: heap.c:3605: Test failed: got ullAvailPhys 0x14ab2d000, expected 0x14ad5a000 heap.c:3607: Test failed: got ullAvailPageFile 0x179c99000, expected 0x179ec6000
This merge request was closed by Francois Gouget. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2213
participants (3)
-
Francois Gouget -
Francois Gouget (@fgouget) -
Marvin