Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52648 Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- programs/conhost/tests/tty.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/programs/conhost/tests/tty.c b/programs/conhost/tests/tty.c index 849986a1c29..fa1552b3299 100644 --- a/programs/conhost/tests/tty.c +++ b/programs/conhost/tests/tty.c @@ -453,8 +453,9 @@ static void child_expect_read_result_(unsigned int line, HANDLE pipe, const WCHA ok_(__FILE__,line)(!memcmp(expect, buf, count), "unexpected data %s\n", wine_dbgstr_w(buf)); }
-#define child_expect_read_control_result(a,b,c) child_expect_read_control_result_(__LINE__,a,b,c) -static void child_expect_read_control_result_(unsigned int line, HANDLE pipe, const WCHAR *expect, DWORD state) +#define child_expect_read_control_result(a,b,c) child_expect_read_control_result_(__LINE__,a,b,c,c) +#define child_expect_read_control_result_broken(a,b,c,d) child_expect_read_control_result_(__LINE__,a,b,c,d) +static void child_expect_read_control_result_(unsigned int line, HANDLE pipe, const WCHAR *expect, DWORD state, DWORD altstate) { size_t exlen = wcslen(expect); WCHAR buf[4096]; @@ -468,7 +469,7 @@ static void child_expect_read_control_result_(unsigned int line, HANDLE pipe, co count, sizeof(DWORD) + exlen * sizeof(WCHAR)); buf[count / sizeof(WCHAR)] = 0; todo_wine_if(*(DWORD *)buf != state && *(DWORD *)buf == 0) - ok_(__FILE__,line)(*(DWORD *)buf == state, "keyboard state: got %lx, expected %lx\n", *(DWORD *)buf, state); + ok_(__FILE__,line)(*(DWORD *)buf == state || broken(*(DWORD *)buf == altstate), "keyboard state: got %lx, expected %lx\n", *(DWORD *)buf, state); ok_(__FILE__,line)(!memcmp(expect, ptr, count - sizeof(DWORD)), "unexpected data %s %s\n", wine_dbgstr_w(ptr), wine_dbgstr_w(expect)); }
@@ -1359,10 +1360,12 @@ static void test_read_console_control(void) strcpy(buf, "def."); buf[3] = ctrl; write_console_pipe(buf); wcscpy(bufw, L"abcdef."); bufw[6] = (WCHAR)ctrl; - child_expect_read_control_result(child_pipe, bufw, - (ctrl == '\t' || ctrl == '\r') ? 0 - : ((ctrl == 30 || ctrl == 31) ? (LEFT_CTRL_PRESSED | SHIFT_PRESSED) - : LEFT_CTRL_PRESSED)); + if (ctrl == 30 || ctrl == 31) + child_expect_read_control_result_broken(child_pipe, bufw, + LEFT_CTRL_PRESSED | SHIFT_PRESSED, LEFT_CTRL_PRESSED); + else + child_expect_read_control_result(child_pipe, bufw, + (ctrl == '\t' || ctrl == '\r') ? 0 : LEFT_CTRL_PRESSED); skip_sequence("\x1b[?25l"); /* hide cursor */ expect_output_sequence("def"); skip_sequence("\x1b[?25h"); /* show cursor */
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=110380
Your paranoid android.
=== w10pro64_he (64 bit report) ===
conhost.exe: tty.c:1093: Test failed: expected hide cursor escape tty.c:1095: Test failed: 0: expected "\x1b[30m" got "\x1b[25l\x1b[30m\x1b[8;1H567890\r\n234567\r\n901234\x1b[4;3H\x1b[?25h" tty.c:1096: Test failed: 0: expected "\x1b[8;1H" got "\x1b[25l\x1b[30m\x1b[8;1H567890\r\n234567\r\n901234\x1b[4;3H\x1b[?25h" tty.c:1097: Test failed: 0: expected "567890\r\n" got "\x1b[25l\x1b[30m\x1b[8;1H567890\r\n234567\r\n901234\x1b[4;3H\x1b[?25h" tty.c:1098: Test failed: 0: expected "234567\r\n" got "\x1b[25l\x1b[30m\x1b[8;1H567890\r\n234567\r\n901234\x1b[4;3H\x1b[?25h" tty.c:1099: Test failed: 0: expected "901234" got "\x1b[25l\x1b[30m\x1b[8;1H567890\r\n234567\r\n901234\x1b[4;3H\x1b[?25h" tty.c:1100: Test failed: 0: expected "\x1b[4;3H" got "\x1b[25l\x1b[30m\x1b[8;1H567890\r\n234567\r\n901234\x1b[4;3H\x1b[?25h" tty.c:1101: Test failed: 0: expected "\x1b[?25h" got "\x1b[25l\x1b[30m\x1b[8;1H567890\r\n234567\r\n901234\x1b[4;3H\x1b[?25h" tty.c:1102: Test failed: expected empty buffer, got "\x1b[25l\x1b[30m\x1b[8;1H567890\r\n234567\r\n901234\x1b[4;3H\x1b[?25h"
=== w10pro64_ja (64 bit report) ===
conhost.exe: tty: Timeout