[PATCH V3 2/5] dlls/kernel32/tests: skip failing tests on some locale
Eric Pouech
eric.pouech at gmail.com
Thu Apr 21 04:08:09 CDT 2022
there are locale where conhost.exe under Wine fails at startup
(when TranslateCharsetInfo( GetACP() ... ) fails)
skip this case
Signed-off-by: Eric Pouech <eric.pouech at gmail.com>
---
dlls/kernel32/tests/process.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c
index e7b4f30b565..f61b91a1974 100644
--- a/dlls/kernel32/tests/process.c
+++ b/dlls/kernel32/tests/process.c
@@ -1540,7 +1540,14 @@ static void test_Console(void)
if (!is_console(startup.hStdInput) || !is_console(startup.hStdOutput))
{
/* we're not attached to a console, let's do it */
- AllocConsole();
+ if (!AllocConsole() || GetConsoleCP() == 0)
+ {
+ /* if no console is has been created, this whole test will only produce errors
+ * (this happens on Wine for some locale)
+ */
+ skip("Skipping console test (conhost.exe aborted)\n");
+ return;
+ }
startup.hStdInput = CreateFileA("CONIN$", GENERIC_READ|GENERIC_WRITE, 0, &sa, OPEN_EXISTING, 0, 0);
startup.hStdOutput = CreateFileA("CONOUT$", GENERIC_READ|GENERIC_WRITE, 0, &sa, OPEN_EXISTING, 0, 0);
}
More information about the wine-devel
mailing list