dlls/kernel32/tests: correctly handle shell_no_window console in process.c
should fix testbot daily failures for kernel32:process
V1 -> V2: the FreeConsole() call under windows leads to children crashes in test_parent_process_attribute(), so I took the simple path of only calling FreeConsole() when testing under Wine
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/kernel32/tests/process.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c index 8f18a0d37a7..ef2f1e45843 100644 --- a/dlls/kernel32/tests/process.c +++ b/dlls/kernel32/tests/process.c @@ -1543,6 +1543,8 @@ static void test_Console(void) /* first, we need to be sure we're attached to a console */ if (!is_console(startup.hStdInput) || !is_console(startup.hStdOutput)) { + /* could be attached to a Wine shell_no_window console, so detach */ + if (!strcmp(winetest_platform, "wine")) FreeConsole(); /* we're not attached to a console, let's do it */ AllocConsole(); startup.hStdInput = CreateFileA("CONIN$", GENERIC_READ|GENERIC_WRITE, 0, &sa, OPEN_EXISTING, 0, 0);