eric pouech (@epo) commented about dlls/kernel32/tests/loader.c:
+ dll_name_len = wcslen(dll_name); + ok(dll_name_len > 0, "can't get path for NULL module\n"); + ok(dll_name_len < MAX_PATH, "unterminated path for NULL module\n"); + + memset(dll_name, '*', sizeof(dll_name)); + rv = GetModuleFileNameW(NULL, dll_name, dll_name_len); + err = GetLastError(); + ok(err == ERROR_INSUFFICIENT_BUFFER, "didn't get expected error getting path for NULL module with short buffer: %d\n", (int)err); + dll_name_term = wcsnlen(dll_name, MAX_PATH); + ok(dll_name_term > 0, "can't get path for NULL module with short buffer, dll_name_term=%d\n", dll_name_term); + todo_wine { + ok(dll_name_term < MAX_PATH, "unterminated path for NULL module with short buffer, dll_name_term=%d\n", dll_name_term); + ok(dll_name_term == dll_name_len - 1, "incorrect path termination for NULL module with short buffer. Expected %d got %d. rv=%d\n", dll_name_len - 1, dll_name_term, (int)rv); + } + + mod = LoadLibraryW( L"user32.dll" ); after sleeping on it, I wonder what do the tests against user32.dll bring us that the one's on app module don't?
(we tend also to minimize tests so that CPU power and computation time doesn't increase too much; so new tests that show errors and ensure we don't break things in the future are good; tests that bring nothing shoudl be avoided) so unless you have a good argument here, I'd opt for removing them -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10291#note_133840