-- v2: kernelbase: Return full title length from GetConsoleTitle() kernel32/tests: Add tests for GetConsoleTitle()
From: Hugh McMaster hugh.mcmaster@outlook.com
--- dlls/kernel32/tests/console.c | 72 +++++++++++++++++++++++++++-------- 1 file changed, 56 insertions(+), 16 deletions(-)
diff --git a/dlls/kernel32/tests/console.c b/dlls/kernel32/tests/console.c index 5d65b0b75e7..baab16f4b00 100644 --- a/dlls/kernel32/tests/console.c +++ b/dlls/kernel32/tests/console.c @@ -4230,28 +4230,66 @@ static void test_SetConsoleScreenBufferInfoEx(HANDLE std_output) CloseHandle(std_input); }
-static void test_console_title(void) +static void test_GetConsoleTitleA(void) { - WCHAR buf[64]; - BOOL ret; + char buf[64], str[] = "test"; + DWORD ret; + + ret = SetConsoleTitleA(str); + ok(ret, "SetConsoleTitleA failed: %lu\n", GetLastError()); + + ret = GetConsoleTitleA(NULL, 0); + ok(!ret, "Unexpected string length; error %lu\n", GetLastError()); + + ret = GetConsoleTitleA(buf, 0); + ok(!ret, "Unexpected string length; error %lu\n", GetLastError()); + + ret = GetConsoleTitleA(buf, ARRAY_SIZE(buf)); + ok(ret, "GetConsoleTitleW failed: %lu\n", GetLastError()); + ok(ret == strlen(str), "Got string length %lu, expected %lu\n", ret, strlen(str)); + ok(!strcmp(buf, str), "Title = %s\n", wine_dbgstr_a(buf)); + + ret = SetConsoleTitleA(""); + ok(ret, "SetConsoleTitleA failed: %lu\n", GetLastError()); + + ret = GetConsoleTitleA(buf, ARRAY_SIZE(buf)); + ok(!ret, "Unexpected string length; error %lu\n", GetLastError()); +} + +static void test_GetConsoleTitleW(void) +{ + WCHAR buf[64], str[] = L"test"; + DWORD ret;
- ret = SetConsoleTitleW(L"test"); + ret = SetConsoleTitleW(str); ok(ret, "SetConsoleTitleW failed: %lu\n", GetLastError());
+ ret = GetConsoleTitleW(NULL, 0); + ok(!ret, "Unexpected string length; error %lu\n", GetLastError()); + + ret = GetConsoleTitleW(buf, 0); + ok(!ret, "Unexpected string length; error %lu\n", GetLastError()); + ret = GetConsoleTitleW(buf, ARRAY_SIZE(buf)); ok(ret, "GetConsoleTitleW failed: %lu\n", GetLastError()); - ok(!wcscmp(buf, L"test"), "title = %s\n", wine_dbgstr_w(buf)); + todo_wine ok(ret == wcslen(str), "Got string length %lu, expected %lu\n", ret, wcslen(str)); + ok(!wcscmp(buf, str), "Title = %s\n", wine_dbgstr_w(buf));
- if (!skip_nt) - { - ret = GetConsoleTitleW(buf, 2); - ok(ret, "GetConsoleTitleW failed: %lu\n", GetLastError()); - ok(!wcscmp(buf, L"t"), "title = %s\n", wine_dbgstr_w(buf)); + ret = GetConsoleTitleW(buf, 2); + ok(ret, "GetConsoleTitleW failed: %lu\n", GetLastError()); + todo_wine ok(ret == wcslen(str), "Got string length %lu, expected %lu\n", ret, wcslen(str)); + if (!skip_nt) ok(!wcscmp(buf, L"t"), "Title = %s\n", wine_dbgstr_w(buf));
- ret = GetConsoleTitleW(buf, 4); - ok(ret, "GetConsoleTitleW failed: %lu\n", GetLastError()); - ok(!wcscmp(buf, L"tes"), "title = %s\n", wine_dbgstr_w(buf)); - } + ret = GetConsoleTitleW(buf, 4); + ok(ret, "GetConsoleTitleW failed: %lu\n", GetLastError()); + ok(ret == wcslen(str), "Got string length %lu, expected %lu\n", ret, wcslen(str)); + if (!skip_nt) ok(!wcscmp(buf, L"tes"), "Title = %s\n", wine_dbgstr_w(buf)); + + ret = SetConsoleTitleW(L""); + ok(ret, "SetConsoleTitleW failed: %lu\n", GetLastError()); + + ret = GetConsoleTitleW(buf, ARRAY_SIZE(buf)); + todo_wine ok(!ret, "Unexpected string length; error %lu\n", GetLastError()); }
static void test_file_info(HANDLE input, HANDLE output) @@ -4584,7 +4622,8 @@ static void test_pseudo_console_child(HANDLE input, HANDLE output) hwnd = GetConsoleWindow(); ok(IsWindow(hwnd), "no console window\n");
- test_console_title(); + test_GetConsoleTitleA(); + test_GetConsoleTitleW(); test_WriteConsoleInputW(input); }
@@ -5017,7 +5056,8 @@ START_TEST(console) test_GetConsoleScreenBufferInfoEx(hConOut); test_SetConsoleScreenBufferInfoEx(hConOut); test_file_info(hConIn, hConOut); - test_console_title(); + test_GetConsoleTitleA(); + test_GetConsoleTitleW(); if (!test_current) { test_pseudo_console();
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=124287
Your paranoid android.
=== w8 (32 bit report) ===
kernel32: console.c:2352: Test failed: [9] Expected count to be 0, got 27 console.c:2352: Test failed: [13] Expected count to be 0, got 27 console.c:2352: Test failed: [15] Expected count to be 0, got 27 console.c:2442: Test failed: [9] Expected count to be 0, got 27 console.c:2442: Test failed: [13] Expected count to be 0, got 27 console.c:2442: Test failed: [15] Expected count to be 0, got 27 console.c:2532: Test failed: [9] Expected count to be 0, got 27 console.c:2532: Test failed: [13] Expected count to be 0, got 27 console.c:2532: Test failed: [15] Expected count to be 0, got 27 console.c:2948: Test failed: [9] Expected count to be 0, got 27 console.c:2948: Test failed: [13] Expected count to be 0, got 27 console.c:2948: Test failed: [15] Expected count to be 0, got 27 console.c:3038: Test failed: [9] Expected count to be 0, got 27 console.c:3038: Test failed: [13] Expected count to be 0, got 27 console.c:3038: Test failed: [15] Expected count to be 0, got 27 console.c:3127: Test failed: [9] Expected count to be 0, got 27 console.c:3127: Test failed: [13] Expected count to be 0, got 27 console.c:3127: Test failed: [15] Expected count to be 0, got 27
=== w8adm (32 bit report) ===
kernel32: console.c:2352: Test failed: [9] Expected count to be 0, got 27 console.c:2352: Test failed: [13] Expected count to be 0, got 27 console.c:2352: Test failed: [15] Expected count to be 0, got 27 console.c:2442: Test failed: [9] Expected count to be 0, got 27 console.c:2442: Test failed: [13] Expected count to be 0, got 27 console.c:2442: Test failed: [15] Expected count to be 0, got 27 console.c:2532: Test failed: [9] Expected count to be 0, got 27 console.c:2532: Test failed: [13] Expected count to be 0, got 27 console.c:2532: Test failed: [15] Expected count to be 0, got 27 console.c:2948: Test failed: [9] Expected count to be 0, got 27 console.c:2948: Test failed: [13] Expected count to be 0, got 27 console.c:2948: Test failed: [15] Expected count to be 0, got 27 console.c:3038: Test failed: [9] Expected count to be 0, got 27 console.c:3038: Test failed: [13] Expected count to be 0, got 27 console.c:3038: Test failed: [15] Expected count to be 0, got 27 console.c:3127: Test failed: [9] Expected count to be 0, got 27 console.c:3127: Test failed: [13] Expected count to be 0, got 27 console.c:3127: Test failed: [15] Expected count to be 0, got 27
=== w864 (32 bit report) ===
kernel32: console.c:2352: Test failed: [9] Expected count to be 0, got 27 console.c:2352: Test failed: [13] Expected count to be 0, got 27 console.c:2352: Test failed: [15] Expected count to be 0, got 27 console.c:2442: Test failed: [9] Expected count to be 0, got 27 console.c:2442: Test failed: [13] Expected count to be 0, got 27 console.c:2442: Test failed: [15] Expected count to be 0, got 27 console.c:2532: Test failed: [9] Expected count to be 0, got 27 console.c:2532: Test failed: [13] Expected count to be 0, got 27 console.c:2532: Test failed: [15] Expected count to be 0, got 27 console.c:2948: Test failed: [9] Expected count to be 0, got 27 console.c:2948: Test failed: [13] Expected count to be 0, got 27 console.c:2948: Test failed: [15] Expected count to be 0, got 27 console.c:3038: Test failed: [9] Expected count to be 0, got 27 console.c:3038: Test failed: [13] Expected count to be 0, got 27 console.c:3038: Test failed: [15] Expected count to be 0, got 27 console.c:3127: Test failed: [9] Expected count to be 0, got 27 console.c:3127: Test failed: [13] Expected count to be 0, got 27 console.c:3127: Test failed: [15] Expected count to be 0, got 27
=== w1064v1507 (32 bit report) ===
kernel32: console.c:2352: Test failed: [9] Expected count to be 0, got 32 console.c:2352: Test failed: [13] Expected count to be 0, got 32 console.c:2352: Test failed: [15] Expected count to be 0, got 32 console.c:2442: Test failed: [9] Expected count to be 0, got 32 console.c:2442: Test failed: [13] Expected count to be 0, got 32 console.c:2442: Test failed: [15] Expected count to be 0, got 32 console.c:2532: Test failed: [9] Expected count to be 0, got 32 console.c:2532: Test failed: [13] Expected count to be 0, got 32 console.c:2532: Test failed: [15] Expected count to be 0, got 32 console.c:2948: Test failed: [9] Expected count to be 0, got 32 console.c:2948: Test failed: [13] Expected count to be 0, got 32 console.c:2948: Test failed: [15] Expected count to be 0, got 32 console.c:3038: Test failed: [9] Expected count to be 0, got 32 console.c:3038: Test failed: [13] Expected count to be 0, got 32 console.c:3038: Test failed: [15] Expected count to be 0, got 32 console.c:3127: Test failed: [9] Expected count to be 0, got 32 console.c:3127: Test failed: [13] Expected count to be 0, got 32 console.c:3127: Test failed: [15] Expected count to be 0, got 32
=== w1064v1809 (32 bit report) ===
kernel32: console.c:2352: Test failed: [9] Expected count to be 0, got 29 console.c:2352: Test failed: [13] Expected count to be 0, got 29 console.c:2352: Test failed: [15] Expected count to be 0, got 29 console.c:2442: Test failed: [9] Expected count to be 0, got 29 console.c:2442: Test failed: [13] Expected count to be 0, got 29 console.c:2442: Test failed: [15] Expected count to be 0, got 29 console.c:2532: Test failed: [9] Expected count to be 0, got 29 console.c:2532: Test failed: [13] Expected count to be 0, got 29 console.c:2532: Test failed: [15] Expected count to be 0, got 29 console.c:2948: Test failed: [9] Expected count to be 0, got 29 console.c:2948: Test failed: [13] Expected count to be 0, got 29 console.c:2948: Test failed: [15] Expected count to be 0, got 29 console.c:3038: Test failed: [9] Expected count to be 0, got 29 console.c:3038: Test failed: [13] Expected count to be 0, got 29 console.c:3038: Test failed: [15] Expected count to be 0, got 29 console.c:3127: Test failed: [9] Expected count to be 0, got 29 console.c:3127: Test failed: [13] Expected count to be 0, got 29 console.c:3127: Test failed: [15] Expected count to be 0, got 29
=== w1064 (32 bit report) ===
kernel32: console.c:2352: Test failed: [9] Expected count to be 0, got 15 console.c:2352: Test failed: [13] Expected count to be 0, got 15 console.c:2352: Test failed: [15] Expected count to be 0, got 15 console.c:2442: Test failed: [9] Expected count to be 0, got 15 console.c:2442: Test failed: [13] Expected count to be 0, got 15 console.c:2442: Test failed: [15] Expected count to be 0, got 15 console.c:2532: Test failed: [9] Expected count to be 0, got 15 console.c:2532: Test failed: [13] Expected count to be 0, got 15 console.c:2532: Test failed: [15] Expected count to be 0, got 15 console.c:2948: Test failed: [9] Expected count to be 0, got 15 console.c:2948: Test failed: [13] Expected count to be 0, got 15 console.c:2948: Test failed: [15] Expected count to be 0, got 15 console.c:3038: Test failed: [9] Expected count to be 0, got 15 console.c:3038: Test failed: [13] Expected count to be 0, got 15 console.c:3038: Test failed: [15] Expected count to be 0, got 15 console.c:3127: Test failed: [9] Expected count to be 0, got 15 console.c:3127: Test failed: [13] Expected count to be 0, got 15 console.c:3127: Test failed: [15] Expected count to be 0, got 15
=== w1064_tsign (32 bit report) ===
kernel32: console.c:2352: Test failed: [9] Expected count to be 0, got 15 console.c:2352: Test failed: [13] Expected count to be 0, got 15 console.c:2352: Test failed: [15] Expected count to be 0, got 15 console.c:2442: Test failed: [9] Expected count to be 0, got 15 console.c:2442: Test failed: [13] Expected count to be 0, got 15 console.c:2442: Test failed: [15] Expected count to be 0, got 15 console.c:2532: Test failed: [9] Expected count to be 0, got 15 console.c:2532: Test failed: [13] Expected count to be 0, got 15 console.c:2532: Test failed: [15] Expected count to be 0, got 15 console.c:2948: Test failed: [9] Expected count to be 0, got 15 console.c:2948: Test failed: [13] Expected count to be 0, got 15 console.c:2948: Test failed: [15] Expected count to be 0, got 15 console.c:3038: Test failed: [9] Expected count to be 0, got 15 console.c:3038: Test failed: [13] Expected count to be 0, got 15 console.c:3038: Test failed: [15] Expected count to be 0, got 15 console.c:3127: Test failed: [9] Expected count to be 0, got 15 console.c:3127: Test failed: [13] Expected count to be 0, got 15 console.c:3127: Test failed: [15] Expected count to be 0, got 15
=== w10pro64 (32 bit report) ===
kernel32: console.c:2352: Test failed: [9] Expected count to be 0, got 15 console.c:2352: Test failed: [13] Expected count to be 0, got 15 console.c:2352: Test failed: [15] Expected count to be 0, got 15 console.c:2442: Test failed: [9] Expected count to be 0, got 15 console.c:2442: Test failed: [13] Expected count to be 0, got 15 console.c:2442: Test failed: [15] Expected count to be 0, got 15 console.c:2532: Test failed: [9] Expected count to be 0, got 15 console.c:2532: Test failed: [13] Expected count to be 0, got 15 console.c:2532: Test failed: [15] Expected count to be 0, got 15 console.c:2948: Test failed: [9] Expected count to be 0, got 15 console.c:2948: Test failed: [13] Expected count to be 0, got 15 console.c:2948: Test failed: [15] Expected count to be 0, got 15 console.c:3038: Test failed: [9] Expected count to be 0, got 15 console.c:3038: Test failed: [13] Expected count to be 0, got 15 console.c:3038: Test failed: [15] Expected count to be 0, got 15 console.c:3127: Test failed: [9] Expected count to be 0, got 15 console.c:3127: Test failed: [13] Expected count to be 0, got 15 console.c:3127: Test failed: [15] Expected count to be 0, got 15
From: Hugh McMaster hugh.mcmaster@outlook.com
--- dlls/kernel32/tests/console.c | 6 +++--- dlls/kernelbase/console.c | 23 ++++++++++++++++------- include/wine/condrv.h | 10 ++++++++++ programs/conhost/conhost.c | 22 ++++++++++++++++------ 4 files changed, 45 insertions(+), 16 deletions(-)
diff --git a/dlls/kernel32/tests/console.c b/dlls/kernel32/tests/console.c index baab16f4b00..9c392fca2c5 100644 --- a/dlls/kernel32/tests/console.c +++ b/dlls/kernel32/tests/console.c @@ -4272,12 +4272,12 @@ static void test_GetConsoleTitleW(void)
ret = GetConsoleTitleW(buf, ARRAY_SIZE(buf)); ok(ret, "GetConsoleTitleW failed: %lu\n", GetLastError()); - todo_wine ok(ret == wcslen(str), "Got string length %lu, expected %lu\n", ret, wcslen(str)); + ok(ret == wcslen(str), "Got string length %lu, expected %lu\n", ret, wcslen(str)); ok(!wcscmp(buf, str), "Title = %s\n", wine_dbgstr_w(buf));
ret = GetConsoleTitleW(buf, 2); ok(ret, "GetConsoleTitleW failed: %lu\n", GetLastError()); - todo_wine ok(ret == wcslen(str), "Got string length %lu, expected %lu\n", ret, wcslen(str)); + ok(ret == wcslen(str), "Got string length %lu, expected %lu\n", ret, wcslen(str)); if (!skip_nt) ok(!wcscmp(buf, L"t"), "Title = %s\n", wine_dbgstr_w(buf));
ret = GetConsoleTitleW(buf, 4); @@ -4289,7 +4289,7 @@ static void test_GetConsoleTitleW(void) ok(ret, "SetConsoleTitleW failed: %lu\n", GetLastError());
ret = GetConsoleTitleW(buf, ARRAY_SIZE(buf)); - todo_wine ok(!ret, "Unexpected string length; error %lu\n", GetLastError()); + ok(!ret, "Unexpected string length; error %lu\n", GetLastError()); }
static void test_file_info(HANDLE input, HANDLE output) diff --git a/dlls/kernelbase/console.c b/dlls/kernelbase/console.c index 590198cf7bf..9d2a7ee5e69 100644 --- a/dlls/kernelbase/console.c +++ b/dlls/kernelbase/console.c @@ -1014,10 +1014,7 @@ DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleTitleA( LPSTR title, DWORD size ) if (!ptr) return 0; ret = GetConsoleTitleW( ptr, size ); if (ret) - { - WideCharToMultiByte( GetConsoleOutputCP(), 0, ptr, ret + 1, title, size, NULL, NULL); - ret = strlen(title); - } + WideCharToMultiByte( GetConsoleOutputCP(), 0, ptr, -1, title, size, NULL, NULL); HeapFree( GetProcessHeap(), 0, ptr ); return ret; } @@ -1028,15 +1025,27 @@ DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleTitleA( LPSTR title, DWORD size ) */ DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleTitleW( LPWSTR title, DWORD size ) { - if (!size) return 0; + struct condrv_title_params params; + + if (!title || !size) return 0; + + params.mask = GET_CONSOLE_TITLE_LENGTH; + + if (!console_ioctl( RtlGetCurrentPeb()->ProcessParameters->ConsoleHandle, IOCTL_CONDRV_GET_TITLE, + ¶ms, sizeof(params), ¶ms.title_len, sizeof(params.title_len), NULL )) + return 0; + + if (!params.title_len) return 0; + + params.mask = GET_CONSOLE_TITLE_STRING;
if (!console_ioctl( RtlGetCurrentPeb()->ProcessParameters->ConsoleHandle, IOCTL_CONDRV_GET_TITLE, - NULL, 0, title, (size - 1) * sizeof(WCHAR), &size )) + ¶ms, sizeof(params), title, (size - 1) * sizeof(WCHAR), &size )) return 0;
size /= sizeof(WCHAR); title[size] = 0; - return size + 1; + return params.title_len; }
diff --git a/include/wine/condrv.h b/include/wine/condrv.h index 3355d7177b0..d9231bfde0a 100644 --- a/include/wine/condrv.h +++ b/include/wine/condrv.h @@ -159,6 +159,16 @@ struct condrv_output_info_params #define SET_CONSOLE_OUTPUT_INFO_POPUP_ATTR 0x0040 #define SET_CONSOLE_OUTPUT_INFO_FONT 0x0080
+/* IOCTL_CONDRV_GET_TITLE params */ +struct condrv_title_params +{ + unsigned int mask; /* option mask */ + unsigned int title_len; /* title length (in characters) */ +}; + +#define GET_CONSOLE_TITLE_LENGTH 0x01 +#define GET_CONSOLE_TITLE_STRING 0x02 + /* IOCTL_CONDRV_FILL_OUTPUT params */ struct condrv_fill_output_params { diff --git a/programs/conhost/conhost.c b/programs/conhost/conhost.c index 792daeb520f..c61d9920024 100644 --- a/programs/conhost/conhost.c +++ b/programs/conhost/conhost.c @@ -2675,12 +2675,22 @@ static NTSTATUS console_input_ioctl( struct console *console, unsigned int code,
case IOCTL_CONDRV_GET_TITLE: { - WCHAR *result; - if (in_size) return STATUS_INVALID_PARAMETER; - TRACE( "returning title %s\n", debugstr_w(console->title) ); - *out_size = min( *out_size, console->title ? wcslen( console->title ) * sizeof(WCHAR) : 0 ); - if (!(result = alloc_ioctl_buffer( *out_size ))) return STATUS_NO_MEMORY; - if (*out_size) memcpy( result, console->title, *out_size ); + struct condrv_title_params *params = (struct condrv_title_params *)in_data; + if (params->mask == GET_CONSOLE_TITLE_LENGTH) + { + DWORD *title_len; + if (*out_size != sizeof(DWORD)) return STATUS_INVALID_PARAMETER; + if (!(title_len = alloc_ioctl_buffer( *out_size ))) return STATUS_NO_MEMORY; + *title_len = console->title ? wcslen( console-> title ) : 0; + } + else if (params->mask == GET_CONSOLE_TITLE_STRING) + { + WCHAR *result; + TRACE( "returning title %s\n", debugstr_w(console->title) ); + *out_size = min( *out_size, params->title_len * sizeof(WCHAR) ); + if (!(result = alloc_ioctl_buffer( *out_size ))) return STATUS_NO_MEMORY; + if (*out_size) memcpy( result, console->title, *out_size ); + } return STATUS_SUCCESS; }
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=124288
Your paranoid android.
=== w8 (32 bit report) ===
kernel32: console.c:2352: Test failed: [9] Expected count to be 0, got 27 console.c:2352: Test failed: [13] Expected count to be 0, got 27 console.c:2352: Test failed: [15] Expected count to be 0, got 27 console.c:2442: Test failed: [9] Expected count to be 0, got 27 console.c:2442: Test failed: [13] Expected count to be 0, got 27 console.c:2442: Test failed: [15] Expected count to be 0, got 27 console.c:2532: Test failed: [9] Expected count to be 0, got 27 console.c:2532: Test failed: [13] Expected count to be 0, got 27 console.c:2532: Test failed: [15] Expected count to be 0, got 27 console.c:2948: Test failed: [9] Expected count to be 0, got 27 console.c:2948: Test failed: [13] Expected count to be 0, got 27 console.c:2948: Test failed: [15] Expected count to be 0, got 27 console.c:3038: Test failed: [9] Expected count to be 0, got 27 console.c:3038: Test failed: [13] Expected count to be 0, got 27 console.c:3038: Test failed: [15] Expected count to be 0, got 27 console.c:3127: Test failed: [9] Expected count to be 0, got 27 console.c:3127: Test failed: [13] Expected count to be 0, got 27 console.c:3127: Test failed: [15] Expected count to be 0, got 27
=== w8adm (32 bit report) ===
kernel32: console.c:2352: Test failed: [9] Expected count to be 0, got 27 console.c:2352: Test failed: [13] Expected count to be 0, got 27 console.c:2352: Test failed: [15] Expected count to be 0, got 27 console.c:2442: Test failed: [9] Expected count to be 0, got 27 console.c:2442: Test failed: [13] Expected count to be 0, got 27 console.c:2442: Test failed: [15] Expected count to be 0, got 27 console.c:2532: Test failed: [9] Expected count to be 0, got 27 console.c:2532: Test failed: [13] Expected count to be 0, got 27 console.c:2532: Test failed: [15] Expected count to be 0, got 27 console.c:2948: Test failed: [9] Expected count to be 0, got 27 console.c:2948: Test failed: [13] Expected count to be 0, got 27 console.c:2948: Test failed: [15] Expected count to be 0, got 27 console.c:3038: Test failed: [9] Expected count to be 0, got 27 console.c:3038: Test failed: [13] Expected count to be 0, got 27 console.c:3038: Test failed: [15] Expected count to be 0, got 27 console.c:3127: Test failed: [9] Expected count to be 0, got 27 console.c:3127: Test failed: [13] Expected count to be 0, got 27 console.c:3127: Test failed: [15] Expected count to be 0, got 27
=== w864 (32 bit report) ===
kernel32: console.c:2352: Test failed: [9] Expected count to be 0, got 27 console.c:2352: Test failed: [13] Expected count to be 0, got 27 console.c:2352: Test failed: [15] Expected count to be 0, got 27 console.c:2442: Test failed: [9] Expected count to be 0, got 27 console.c:2442: Test failed: [13] Expected count to be 0, got 27 console.c:2442: Test failed: [15] Expected count to be 0, got 27 console.c:2532: Test failed: [9] Expected count to be 0, got 27 console.c:2532: Test failed: [13] Expected count to be 0, got 27 console.c:2532: Test failed: [15] Expected count to be 0, got 27 console.c:2948: Test failed: [9] Expected count to be 0, got 27 console.c:2948: Test failed: [13] Expected count to be 0, got 27 console.c:2948: Test failed: [15] Expected count to be 0, got 27 console.c:3038: Test failed: [9] Expected count to be 0, got 27 console.c:3038: Test failed: [13] Expected count to be 0, got 27 console.c:3038: Test failed: [15] Expected count to be 0, got 27 console.c:3127: Test failed: [9] Expected count to be 0, got 27 console.c:3127: Test failed: [13] Expected count to be 0, got 27 console.c:3127: Test failed: [15] Expected count to be 0, got 27
=== w1064v1507 (32 bit report) ===
kernel32: console.c:2352: Test failed: [9] Expected count to be 0, got 32 console.c:2352: Test failed: [13] Expected count to be 0, got 32 console.c:2352: Test failed: [15] Expected count to be 0, got 32 console.c:2442: Test failed: [9] Expected count to be 0, got 32 console.c:2442: Test failed: [13] Expected count to be 0, got 32 console.c:2442: Test failed: [15] Expected count to be 0, got 32 console.c:2532: Test failed: [9] Expected count to be 0, got 32 console.c:2532: Test failed: [13] Expected count to be 0, got 32 console.c:2532: Test failed: [15] Expected count to be 0, got 32 console.c:2948: Test failed: [9] Expected count to be 0, got 32 console.c:2948: Test failed: [13] Expected count to be 0, got 32 console.c:2948: Test failed: [15] Expected count to be 0, got 32 console.c:3038: Test failed: [9] Expected count to be 0, got 32 console.c:3038: Test failed: [13] Expected count to be 0, got 32 console.c:3038: Test failed: [15] Expected count to be 0, got 32 console.c:3127: Test failed: [9] Expected count to be 0, got 32 console.c:3127: Test failed: [13] Expected count to be 0, got 32 console.c:3127: Test failed: [15] Expected count to be 0, got 32
=== w1064v1809 (32 bit report) ===
kernel32: console.c:2352: Test failed: [9] Expected count to be 0, got 29 console.c:2352: Test failed: [13] Expected count to be 0, got 29 console.c:2352: Test failed: [15] Expected count to be 0, got 29 console.c:2442: Test failed: [9] Expected count to be 0, got 29 console.c:2442: Test failed: [13] Expected count to be 0, got 29 console.c:2442: Test failed: [15] Expected count to be 0, got 29 console.c:2532: Test failed: [9] Expected count to be 0, got 29 console.c:2532: Test failed: [13] Expected count to be 0, got 29 console.c:2532: Test failed: [15] Expected count to be 0, got 29 console.c:2948: Test failed: [9] Expected count to be 0, got 29 console.c:2948: Test failed: [13] Expected count to be 0, got 29 console.c:2948: Test failed: [15] Expected count to be 0, got 29 console.c:3038: Test failed: [9] Expected count to be 0, got 29 console.c:3038: Test failed: [13] Expected count to be 0, got 29 console.c:3038: Test failed: [15] Expected count to be 0, got 29 console.c:3127: Test failed: [9] Expected count to be 0, got 29 console.c:3127: Test failed: [13] Expected count to be 0, got 29 console.c:3127: Test failed: [15] Expected count to be 0, got 29
=== w1064 (32 bit report) ===
kernel32: console.c:2352: Test failed: [9] Expected count to be 0, got 15 console.c:2352: Test failed: [13] Expected count to be 0, got 15 console.c:2352: Test failed: [15] Expected count to be 0, got 15 console.c:2442: Test failed: [9] Expected count to be 0, got 15 console.c:2442: Test failed: [13] Expected count to be 0, got 15 console.c:2442: Test failed: [15] Expected count to be 0, got 15 console.c:2532: Test failed: [9] Expected count to be 0, got 15 console.c:2532: Test failed: [13] Expected count to be 0, got 15 console.c:2532: Test failed: [15] Expected count to be 0, got 15 console.c:2948: Test failed: [9] Expected count to be 0, got 15 console.c:2948: Test failed: [13] Expected count to be 0, got 15 console.c:2948: Test failed: [15] Expected count to be 0, got 15 console.c:3038: Test failed: [9] Expected count to be 0, got 15 console.c:3038: Test failed: [13] Expected count to be 0, got 15 console.c:3038: Test failed: [15] Expected count to be 0, got 15 console.c:3127: Test failed: [9] Expected count to be 0, got 15 console.c:3127: Test failed: [13] Expected count to be 0, got 15 console.c:3127: Test failed: [15] Expected count to be 0, got 15
=== w1064_tsign (32 bit report) ===
kernel32: console.c:2352: Test failed: [9] Expected count to be 0, got 15 console.c:2352: Test failed: [13] Expected count to be 0, got 15 console.c:2352: Test failed: [15] Expected count to be 0, got 15 console.c:2442: Test failed: [9] Expected count to be 0, got 15 console.c:2442: Test failed: [13] Expected count to be 0, got 15 console.c:2442: Test failed: [15] Expected count to be 0, got 15 console.c:2532: Test failed: [9] Expected count to be 0, got 15 console.c:2532: Test failed: [13] Expected count to be 0, got 15 console.c:2532: Test failed: [15] Expected count to be 0, got 15 console.c:2948: Test failed: [9] Expected count to be 0, got 15 console.c:2948: Test failed: [13] Expected count to be 0, got 15 console.c:2948: Test failed: [15] Expected count to be 0, got 15 console.c:3038: Test failed: [9] Expected count to be 0, got 15 console.c:3038: Test failed: [13] Expected count to be 0, got 15 console.c:3038: Test failed: [15] Expected count to be 0, got 15 console.c:3127: Test failed: [9] Expected count to be 0, got 15 console.c:3127: Test failed: [13] Expected count to be 0, got 15 console.c:3127: Test failed: [15] Expected count to be 0, got 15
=== w10pro64 (32 bit report) ===
kernel32: console.c:2352: Test failed: [9] Expected count to be 0, got 15 console.c:2352: Test failed: [13] Expected count to be 0, got 15 console.c:2352: Test failed: [15] Expected count to be 0, got 15 console.c:2442: Test failed: [9] Expected count to be 0, got 15 console.c:2442: Test failed: [13] Expected count to be 0, got 15 console.c:2442: Test failed: [15] Expected count to be 0, got 15 console.c:2532: Test failed: [9] Expected count to be 0, got 15 console.c:2532: Test failed: [13] Expected count to be 0, got 15 console.c:2532: Test failed: [15] Expected count to be 0, got 15 console.c:2948: Test failed: [9] Expected count to be 0, got 15 console.c:2948: Test failed: [13] Expected count to be 0, got 15 console.c:2948: Test failed: [15] Expected count to be 0, got 15 console.c:3038: Test failed: [9] Expected count to be 0, got 15 console.c:3038: Test failed: [13] Expected count to be 0, got 15 console.c:3038: Test failed: [15] Expected count to be 0, got 15 console.c:3127: Test failed: [9] Expected count to be 0, got 15 console.c:3127: Test failed: [13] Expected count to be 0, got 15 console.c:3127: Test failed: [15] Expected count to be 0, got 15
Hi Hugh,
I don't think sending two requests to conhost to get the title is the best approach I'd rather return the length + string in one ioctl. That will of course require a buffer allocation & copy of the returned string, but IMO it's a) way faster than two ioctl round trips, b) and moreover simpler to follow (no sub ioctl code in request...) my 2 cents
Hi Eric, returning the length plus string in one ioctl call was my second option. I went with this design becaus I was concerned about the expense of the extra buffer allocation and copy. Still, unless anyone has a compelling reason to keep this design, I'm happy to rework the patch.