Module: wine Branch: master Commit: fbe23dafe1be3614f4eae15f857e50c9296291be URL: https://gitlab.winehq.org/wine/wine/-/commit/fbe23dafe1be3614f4eae15f857e50c...
Author: Eric Pouech eric.pouech@gmail.com Date: Sat Feb 25 17:50:50 2023 +0100
dbghelp/tests: Adapt test_modules_overlap() for Windows 11.
Signed-off-by: Eric Pouech eric.pouech@gmail.com Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54535
---
dlls/dbghelp/tests/dbghelp.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/dlls/dbghelp/tests/dbghelp.c b/dlls/dbghelp/tests/dbghelp.c index 04833e28dc7..34df4dd437b 100644 --- a/dlls/dbghelp/tests/dbghelp.c +++ b/dlls/dbghelp/tests/dbghelp.c @@ -285,7 +285,7 @@ struct nth_module { HANDLE proc; unsigned int index; - BOOL will_fail; + BOOL could_fail; IMAGEHLP_MODULE64 module; };
@@ -297,9 +297,10 @@ static BOOL CALLBACK nth_module_cb(const char* name, DWORD64 base, void* usr) if (nth->index--) return TRUE; nth->module.SizeOfStruct = sizeof(nth->module); ret = SymGetModuleInfo64(nth->proc, base, &nth->module); - if (nth->will_fail) + if (nth->could_fail) { - ok(!ret, "SymGetModuleInfo64 should have failed\n"); + /* Windows11 succeeds into loading the overlapped module */ + ok(!ret || broken(base == nth->module.BaseOfImage), "SymGetModuleInfo64 should have failed\n"); nth->module.BaseOfImage = base; } else @@ -497,7 +498,7 @@ static void test_modules_overlap(void) } ok(nth.index == -1, "Expecting more modules\n"); ok(nth.module.BaseOfImage == tests[i].outputs[j].base, "Wrong base\n"); - if (!nth.will_fail) + if (!nth.could_fail) { ok(nth.module.ImageSize == tests[i].outputs[j].size, "Wrong size\n"); ok(!strcasecmp(nth.module.ModuleName, tests[i].outputs[j].name), "Wrong name\n");