Module: wine Branch: master Commit: 38e3a92e21220a6e8a97ba3e472a704d6a4f6664 URL: https://gitlab.winehq.org/wine/wine/-/commit/38e3a92e21220a6e8a97ba3e472a704...
Author: Eric Pouech eric.pouech@gmail.com Date: Tue Feb 21 17:34:58 2023 +0100
psapi/tests: Use msinfo32.exe instead of notepad.exe.
Under Windows 11, notepad.exe has been migrated into the UWP framework, and can no longer be launched as a 32bit process: - even if c:\windows\syswow64\notepad.exe is still a 32 bit PE file - the process created from c:\windows\syswow64\notepad.exe is not a wow64 process.
So use msinfo32.exe instead. Like notepad.exe, it's a gui application, present on Wine and all test-bot:ed windows platforms. But unlike notepad.exe, it's not an UWP app on Windows 11.
(May not fix all the issues in the following bug list, but will remove a lot of errors).
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54504 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54505 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54506 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54507 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54508 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54509 Signed-off-by: Eric Pouech eric.pouech@gmail.com
---
dlls/psapi/tests/psapi_main.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/dlls/psapi/tests/psapi_main.c b/dlls/psapi/tests/psapi_main.c index 227fc52c2ad..860598c39c5 100644 --- a/dlls/psapi/tests/psapi_main.c +++ b/dlls/psapi/tests/psapi_main.c @@ -76,7 +76,7 @@ static void test_EnumProcesses(void)
static void test_EnumProcessModules(void) { - char buffer[200] = "C:\windows\system32\notepad.exe"; + char buffer[200] = "C:\windows\system32\msinfo32.exe"; PROCESS_INFORMATION pi = {0}; STARTUPINFOA si = {0}; void *cookie; @@ -143,7 +143,7 @@ static void test_EnumProcessModules(void) char name[40]; HMODULE hmods[3];
- strcpy(buffer, "C:\windows\syswow64\notepad.exe"); + strcpy(buffer, "C:\windows\syswow64\msinfo32.exe"); ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); if (ret) { @@ -160,7 +160,7 @@ static void test_EnumProcessModules(void)
ret = GetModuleBaseNameA(pi.hProcess, hmods[0], name, sizeof(name)); ok(ret, "got error %lu\n", GetLastError()); - ok(!strcmp(name, "notepad.exe"), "got %s\n", name); + ok(!strcmp(name, "msinfo32.exe"), "got %s\n", name);
ret = GetModuleFileNameExA(pi.hProcess, hmods[0], name, sizeof(name)); ok(ret, "got error %lu\n", GetLastError()); @@ -341,7 +341,7 @@ static unsigned int snapshot_count_in_dir(const struct moduleex_snapshot* snap,
static void test_EnumProcessModulesEx(void) { - char buffer[200] = "C:\windows\system32\notepad.exe"; + char buffer[200] = "C:\windows\system32\msinfo32.exe"; PROCESS_INFORMATION pi = {0}; STARTUPINFOA si = {0}; void *cookie; @@ -449,9 +449,9 @@ static void test_EnumProcessModulesEx(void)
ok(snapshot_is_subset(&snap[0], &snap[2]), "32bit and default module lists should match\n"); ok(snapshot_is_subset(&snap[2], &snap[3]), "default and all module lists should match\n"); - snapshot_check_first_main_module(&snap[0], pi.hProcess, "c:\windows\syswow64\notepad.exe"); - snapshot_check_first_main_module(&snap[2], pi.hProcess, "c:\windows\syswow64\notepad.exe"); - snapshot_check_first_main_module(&snap[3], pi.hProcess, "c:\windows\syswow64\notepad.exe"); + snapshot_check_first_main_module(&snap[0], pi.hProcess, "c:\windows\syswow64\msinfo32.exe"); + snapshot_check_first_main_module(&snap[2], pi.hProcess, "c:\windows\syswow64\msinfo32.exe"); + snapshot_check_first_main_module(&snap[3], pi.hProcess, "c:\windows\syswow64\msinfo32.exe"); winetest_pop_context(); }
@@ -461,7 +461,7 @@ static void test_EnumProcessModulesEx(void) { unsigned int count;
- strcpy(buffer, "C:\windows\syswow64\notepad.exe"); + strcpy(buffer, "C:\windows\syswow64\msinfo32.exe"); ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); if (ret) { @@ -492,7 +492,7 @@ static void test_EnumProcessModulesEx(void) ok(ret, "GetSystemWow64DirectoryA failed: %lu\n", GetLastError()); count = snapshot_count_in_dir(snap, pi.hProcess, buffer); todo_wine - ok(count <= 1, "Wrong count %u in %s\n", count, buffer); /* notepad can be from system wow64 */ + ok(count <= 1, "Wrong count %u in %s\n", count, buffer); /* msinfo32 can be from system wow64 */ ret = GetSystemDirectoryA(buffer, sizeof(buffer)); ok(ret, "GetSystemDirectoryA failed: %lu\n", GetLastError()); count = snapshot_count_in_dir(snap, pi.hProcess, buffer);