Windows 10 and 11 introduce the timeout.exe command. This is a similar program with same argument options
-- v9: timeout: add minimal test suite
From: Michele Dionisio michele.dionisio@powersoft.com
--- configure.ac | 1 + programs/timeout/Makefile.in | 8 ++ programs/timeout/main.c | 148 +++++++++++++++++++++++++++++++++++ programs/timeout/timeout.h | 28 +++++++ programs/timeout/timeout.rc | 33 ++++++++ 5 files changed, 218 insertions(+) create mode 100644 programs/timeout/Makefile.in create mode 100644 programs/timeout/main.c create mode 100644 programs/timeout/timeout.h create mode 100644 programs/timeout/timeout.rc
diff --git a/configure.ac b/configure.ac index 3f8be71bd21..0f2bfd93b9b 100644 --- a/configure.ac +++ b/configure.ac @@ -3514,6 +3514,7 @@ WINE_CONFIG_MAKEFILE(programs/tasklist) WINE_CONFIG_MAKEFILE(programs/tasklist/tests) WINE_CONFIG_MAKEFILE(programs/taskmgr) WINE_CONFIG_MAKEFILE(programs/termsv) +WINE_CONFIG_MAKEFILE(programs/timeout) WINE_CONFIG_MAKEFILE(programs/uninstaller) WINE_CONFIG_MAKEFILE(programs/unlodctr) WINE_CONFIG_MAKEFILE(programs/view) diff --git a/programs/timeout/Makefile.in b/programs/timeout/Makefile.in new file mode 100644 index 00000000000..708cca355ff --- /dev/null +++ b/programs/timeout/Makefile.in @@ -0,0 +1,8 @@ +MODULE = timeout.exe +IMPORTS = user32 + +EXTRADLLFLAGS = -mconsole -municode + +SOURCES = \ + timeout.rc \ + main.c diff --git a/programs/timeout/main.c b/programs/timeout/main.c new file mode 100644 index 00000000000..5669b9ad1eb --- /dev/null +++ b/programs/timeout/main.c @@ -0,0 +1,148 @@ +/* + * Copyright 2024 Michele Dionisio michele.dionisio@gmail.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include <windows.h> +#include <stdio.h> +#include <stdarg.h> +#include <string.h> +#include <synchapi.h> +#include <stdbool.h> +#include <wchar.h> +#include <conio.h> +#include "timeout.h" + +static int WINAPIV timeout_error_wprintf(int msg, ...) +{ + WCHAR msg_buffer[MAXSTRING]; + va_list va_args; + int ret; + + LoadStringW(GetModuleHandleW(NULL), msg, msg_buffer, ARRAY_SIZE(msg_buffer)); + va_start(va_args, msg); + ret = vfwprintf(stderr, msg_buffer, va_args); + va_end(va_args); + return ret; +} + +static int WINAPIV timeout_message(int msg) +{ + WCHAR msg_buffer[MAXSTRING]; + + LoadStringW(GetModuleHandleW(NULL), msg, msg_buffer, ARRAY_SIZE(msg_buffer)); + return fwprintf(stdout, msg_buffer); +} + +static int WINAPIV timeout_wprintf(int msg, ...) +{ + WCHAR msg_buffer[MAXSTRING]; + va_list va_args; + int ret; + + LoadStringW(GetModuleHandleW(NULL), msg, msg_buffer, ARRAY_SIZE(msg_buffer)); + va_start(va_args, msg); + ret = vfwprintf(stdout, msg_buffer, va_args); + va_end(va_args); + return ret; +} + +static volatile bool stop = false; + +static BOOL WINAPI ctrl_c_handler(DWORD dwCtrlType) +{ + if (dwCtrlType == CTRL_C_EVENT) + { + stop = true; + return TRUE; + } + return FALSE; +} + +int __cdecl wmain(int argc, WCHAR *argv[]) +{ + int ret = 1; + int wait_time = 0; + int wait_time_valid = 0; + int nobreak = 0; + + if (argc <= 1) + { + timeout_error_wprintf(STRING_BAD_COMMAND_LINE); + return 2; + } + + for (int i = 1; i < argc; i++) + { + if (wcscmp(argv[i], L"/?") == 0) + { + timeout_message(STRING_USAGE); + ret = 0; + goto done; + } + else if (wcsicmp(argv[i], L"/t") == 0) + { + if ((i + 1) < argc) + { + i++; + wait_time = _wtoi(argv[i]); + wait_time_valid = 1; + } + else + { + timeout_error_wprintf(STRING_BAD_COMMAND_LINE); + return 2; + } + } + else if (wcsicmp(argv[i], L"/nobreak") == 0) + { + nobreak = 1; + } + else + { + timeout_error_wprintf(STRING_BAD_COMMAND_LINE); + return 2; + } + } + + if (wait_time_valid == 0) + { + timeout_error_wprintf(STRING_BAD_COMMAND_LINE); + return 2; + } + + SetConsoleCtrlHandler(ctrl_c_handler, TRUE); + + for (int i = 0; (wait_time < 0) || (i < wait_time); i++) + { + timeout_wprintf(STRING_WAITING_SINCE, i); + timeout_message((nobreak == 0) ? STRING_PRESS_KEY : STRING_PRESS_CRTLC); + if (stop) + { + break; + } + if ((nobreak == 0) && _kbhit()) + { + break; + } + Sleep(1000); + } + timeout_message(STRING_END); + ret = 0; + +done: + return ret; +} diff --git a/programs/timeout/timeout.h b/programs/timeout/timeout.h new file mode 100644 index 00000000000..e25295b6c21 --- /dev/null +++ b/programs/timeout/timeout.h @@ -0,0 +1,28 @@ +/* + * Copyright 2024 Michele Dionisio michele.dionisio@gmail.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include <windef.h> + +#define MAXSTRING 8192 + +#define STRING_USAGE 101 +#define STRING_BAD_COMMAND_LINE 102 +#define STRING_WAITING_SINCE 103 +#define STRING_PRESS_CRTLC 104 +#define STRING_PRESS_KEY 105 +#define STRING_END 106 diff --git a/programs/timeout/timeout.rc b/programs/timeout/timeout.rc new file mode 100644 index 00000000000..0689374440c --- /dev/null +++ b/programs/timeout/timeout.rc @@ -0,0 +1,33 @@ +/* + * Copyright 2024 Michele Dionisio michele.dionisio@gmail.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "timeout.h" + +#pragma makedep po + +LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT + +STRINGTABLE +{ + STRING_USAGE, "Usage: timeout /T <timeout> [</NOBREAK>]\n" + STRING_BAD_COMMAND_LINE, "TIMEOUT: Bad command line\n" + STRING_WAITING_SINCE, "waiting since %d sec. " + STRING_PRESS_CRTLC, "press CTRL+C...\r" + STRING_PRESS_KEY, "press a key to continue...\r" + STRING_END, "\n" +}
From: Michele Dionisio michele.dionisio@powersoft.com
--- configure.ac | 1 + programs/timeout/main.c | 29 ++++-- programs/timeout/tests/Makefile.in | 4 + programs/timeout/tests/timeout.c | 154 +++++++++++++++++++++++++++++ programs/timeout/timeout.h | 1 - programs/timeout/timeout.rc | 1 - 6 files changed, 180 insertions(+), 10 deletions(-) create mode 100644 programs/timeout/tests/Makefile.in create mode 100644 programs/timeout/tests/timeout.c
diff --git a/configure.ac b/configure.ac index 0f2bfd93b9b..5955eb89c78 100644 --- a/configure.ac +++ b/configure.ac @@ -3515,6 +3515,7 @@ WINE_CONFIG_MAKEFILE(programs/tasklist/tests) WINE_CONFIG_MAKEFILE(programs/taskmgr) WINE_CONFIG_MAKEFILE(programs/termsv) WINE_CONFIG_MAKEFILE(programs/timeout) +WINE_CONFIG_MAKEFILE(programs/timeout/tests) WINE_CONFIG_MAKEFILE(programs/uninstaller) WINE_CONFIG_MAKEFILE(programs/unlodctr) WINE_CONFIG_MAKEFILE(programs/view) diff --git a/programs/timeout/main.c b/programs/timeout/main.c index 5669b9ad1eb..50f3c5a0c00 100644 --- a/programs/timeout/main.c +++ b/programs/timeout/main.c @@ -74,7 +74,6 @@ static BOOL WINAPI ctrl_c_handler(DWORD dwCtrlType)
int __cdecl wmain(int argc, WCHAR *argv[]) { - int ret = 1; int wait_time = 0; int wait_time_valid = 0; int nobreak = 0; @@ -90,15 +89,26 @@ int __cdecl wmain(int argc, WCHAR *argv[]) if (wcscmp(argv[i], L"/?") == 0) { timeout_message(STRING_USAGE); - ret = 0; - goto done; + return 0; } else if (wcsicmp(argv[i], L"/t") == 0) { if ((i + 1) < argc) { + WCHAR *endptr = NULL; + long l_wait_time; i++; - wait_time = _wtoi(argv[i]); + l_wait_time = wcstol(argv[i], &endptr, 10); + if (*endptr != L'\0') { + timeout_error_wprintf(STRING_BAD_COMMAND_LINE); + return 2; + } + if ((l_wait_time < -1) || (l_wait_time > 99999)) + { + timeout_error_wprintf(STRING_BAD_COMMAND_LINE); + return 2; + } + wait_time = (int)l_wait_time; wait_time_valid = 1; } else @@ -140,9 +150,12 @@ int __cdecl wmain(int argc, WCHAR *argv[]) } Sleep(1000); } - timeout_message(STRING_END); - ret = 0; + putc('\n', stdout);
-done: - return ret; + if (stop) + { + return STATUS_CONTROL_C_EXIT; + } + + return 0; } diff --git a/programs/timeout/tests/Makefile.in b/programs/timeout/tests/Makefile.in new file mode 100644 index 00000000000..a50cdee3062 --- /dev/null +++ b/programs/timeout/tests/Makefile.in @@ -0,0 +1,4 @@ +TESTDLL = timeout.exe + +SOURCES = \ + timeout.c diff --git a/programs/timeout/tests/timeout.c b/programs/timeout/tests/timeout.c new file mode 100644 index 00000000000..58bc8b0304c --- /dev/null +++ b/programs/timeout/tests/timeout.c @@ -0,0 +1,154 @@ +/* + * Copyright 2024 Michele Dionisio michele.dionisio@gmail.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include <windows.h> +#include "wine/test.h" + +#define MAX_BUFFER 65536 + +static char stdout_buffer[MAX_BUFFER], stderr_buffer[MAX_BUFFER]; +static DWORD stdout_size, stderr_size; + +static void read_all_from_handle(HANDLE handle, char *buffer, DWORD *size) +{ + char bytes[4096]; + DWORD bytes_read; + + memset(buffer, 0, MAX_BUFFER); + *size = 0; + for (;;) + { + BOOL success = ReadFile(handle, bytes, sizeof(bytes), &bytes_read, NULL); + if (!success || !bytes_read) + break; + if (*size + bytes_read > MAX_BUFFER) + { + ok(FALSE, "Insufficient buffer.\n"); + break; + } + memcpy(buffer + *size, bytes, bytes_read); + *size += bytes_read; + } +} + +static void write_to_handle(HANDLE handle, const char *str, int len) +{ + DWORD dummy; + + WriteFile(handle, str, len, &dummy, NULL); +} + +#define run_timeout_stdin(a, b, c) _run_timeout_stdin(__FILE__, __LINE__, a, b, c) +static void _run_timeout_stdin(const char *file, int line, const char *commandline, const char *input, + int exitcode_expected) +{ + HANDLE parent_stdin_write, parent_stdout_read, parent_stderr_read; + HANDLE child_stdin_read, child_stdout_write, child_stderr_write; + SECURITY_ATTRIBUTES security_attributes = {0}; + PROCESS_INFORMATION process_info = {0}; + STARTUPINFOA startup_info = {0}; + char cmd[4096]; + DWORD exitcode; + + security_attributes.nLength = sizeof(SECURITY_ATTRIBUTES); + security_attributes.bInheritHandle = TRUE; + + CreatePipe(&child_stdin_read, &parent_stdin_write, &security_attributes, 0); + CreatePipe(&parent_stdout_read, &child_stdout_write, &security_attributes, 0); + CreatePipe(&parent_stderr_read, &child_stderr_write, &security_attributes, 0); + + SetHandleInformation(parent_stdin_write, HANDLE_FLAG_INHERIT, 0); + SetHandleInformation(parent_stdout_read, HANDLE_FLAG_INHERIT, 0); + SetHandleInformation(parent_stderr_read, HANDLE_FLAG_INHERIT, 0); + + startup_info.cb = sizeof(STARTUPINFOA); + startup_info.hStdInput = child_stdin_read; + startup_info.hStdOutput = child_stdout_write; + startup_info.hStdError = child_stderr_write; + startup_info.dwFlags |= STARTF_USESTDHANDLES; + + sprintf(cmd, "timeout.exe %s", commandline); + + CreateProcessA(NULL, cmd, NULL, NULL, TRUE, 0, NULL, NULL, &startup_info, &process_info); + CloseHandle(child_stdin_read); + CloseHandle(child_stdout_write); + CloseHandle(child_stderr_write); + + write_to_handle(parent_stdin_write, input, lstrlenA(input)); + CloseHandle(parent_stdin_write); + + read_all_from_handle(parent_stdout_read, stdout_buffer, &stdout_size); + read_all_from_handle(parent_stderr_read, stderr_buffer, &stderr_size); + CloseHandle(parent_stdout_read); + CloseHandle(parent_stderr_read); + + WaitForSingleObject(process_info.hProcess, INFINITE); + GetExitCodeProcess(process_info.hProcess, &exitcode); + CloseHandle(process_info.hProcess); + CloseHandle(process_info.hThread); + ok_(file, line)(exitcode == exitcode_expected, "Expected exitcode %d, got %ld\n", + exitcode_expected, exitcode); +} + +static void test_basic(void) +{ + int ret; + + /* No options */ + run_timeout_stdin("", "", 2); + ok(stdout_size == 0, "Unexpected stdout buffer size %ld.\n", stdout_size); + ok(stderr_size > 0, "Unexpected stderr buffer size %ld.\n", stderr_size); + ret = strcmp(stderr_buffer, "TIMEOUT: Bad command line\r\n"); + ok(!ret, "Got the wrong result.\n"); + + /* /? */ + run_timeout_stdin("/?", "", 0); + ok(stdout_size > 0, "Unexpected stdout buffer size %ld.\n", stdout_size); + ok(stderr_size == 0, "Unexpected stderr buffer size %ld.\n", stderr_size); + + /* /T 1 /NOBREAK */ + run_timeout_stdin("/T 1 /NOBREAK", "", 0); + ok(stdout_size > 0, "Unexpected stdout buffer size %ld.\n", stdout_size); + ok(stderr_size == 0, "Unexpected stderr buffer size %ld.\n", stderr_size); + + /* /T 1ab /NOBREAK */ + run_timeout_stdin("/T 1ab /NOBREAK", "", 2); + ok(stdout_size == 0, "Unexpected stdout buffer size %ld.\n", stdout_size); + ok(stderr_size > 0, "Unexpected stderr buffer size %ld.\n", stderr_size); + + /* /T -3 /NOBREAK */ + run_timeout_stdin("/T -3 /NOBREAK", "", 2); + ok(stdout_size == 0, "Unexpected stdout buffer size %ld.\n", stdout_size); + ok(stderr_size > 0, "Unexpected stderr buffer size %ld.\n", stderr_size); + + /* /T 10000000 /NOBREAK */ + run_timeout_stdin("/T 1000000 /NOBREAK", "", 2); + ok(stdout_size == 0, "Unexpected stdout buffer size %ld.\n", stdout_size); + ok(stderr_size > 0, "Unexpected stderr buffer size %ld.\n", stderr_size); +} + +START_TEST(timeout) +{ + if (PRIMARYLANGID(GetUserDefaultUILanguage()) != LANG_ENGLISH) + { + skip("Tests only work with English locale.\n"); + return; + } + + test_basic(); +} diff --git a/programs/timeout/timeout.h b/programs/timeout/timeout.h index e25295b6c21..8b14e7da086 100644 --- a/programs/timeout/timeout.h +++ b/programs/timeout/timeout.h @@ -25,4 +25,3 @@ #define STRING_WAITING_SINCE 103 #define STRING_PRESS_CRTLC 104 #define STRING_PRESS_KEY 105 -#define STRING_END 106 diff --git a/programs/timeout/timeout.rc b/programs/timeout/timeout.rc index 0689374440c..53922cd7ca0 100644 --- a/programs/timeout/timeout.rc +++ b/programs/timeout/timeout.rc @@ -29,5 +29,4 @@ STRINGTABLE STRING_WAITING_SINCE, "waiting since %d sec. " STRING_PRESS_CRTLC, "press CTRL+C...\r" STRING_PRESS_KEY, "press a key to continue...\r" - STRING_END, "\n" }
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=149835
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
timeout.exe: timeout.c:113: Test failed: Expected exitcode 2, got 1 timeout.c:117: Test failed: Got the wrong result. timeout.c:125: Test failed: Expected exitcode 0, got 1 timeout.c:126: Test failed: Unexpected stdout buffer size 0. timeout.c:127: Test failed: Unexpected stderr buffer size 77. timeout.c:130: Test failed: Expected exitcode 2, got 1 timeout.c:135: Test failed: Expected exitcode 2, got 1 timeout.c:140: Test failed: Expected exitcode 2, got 1
=== w7u_adm (32 bit report) ===
timeout.exe: timeout.c:113: Test failed: Expected exitcode 2, got 1 timeout.c:117: Test failed: Got the wrong result. timeout.c:125: Test failed: Expected exitcode 0, got 1 timeout.c:126: Test failed: Unexpected stdout buffer size 0. timeout.c:127: Test failed: Unexpected stderr buffer size 77. timeout.c:130: Test failed: Expected exitcode 2, got 1 timeout.c:135: Test failed: Expected exitcode 2, got 1 timeout.c:140: Test failed: Expected exitcode 2, got 1
=== w8 (32 bit report) ===
timeout.exe: timeout.c:113: Test failed: Expected exitcode 2, got 1 timeout.c:117: Test failed: Got the wrong result. timeout.c:125: Test failed: Expected exitcode 0, got 1 timeout.c:126: Test failed: Unexpected stdout buffer size 0. timeout.c:127: Test failed: Unexpected stderr buffer size 77. timeout.c:130: Test failed: Expected exitcode 2, got 1 timeout.c:135: Test failed: Expected exitcode 2, got 1 timeout.c:140: Test failed: Expected exitcode 2, got 1
=== w8adm (32 bit report) ===
timeout.exe: timeout.c:113: Test failed: Expected exitcode 2, got 1 timeout.c:117: Test failed: Got the wrong result. timeout.c:125: Test failed: Expected exitcode 0, got 1 timeout.c:126: Test failed: Unexpected stdout buffer size 0. timeout.c:127: Test failed: Unexpected stderr buffer size 77. timeout.c:130: Test failed: Expected exitcode 2, got 1 timeout.c:135: Test failed: Expected exitcode 2, got 1 timeout.c:140: Test failed: Expected exitcode 2, got 1
=== w864 (32 bit report) ===
timeout.exe: timeout.c:113: Test failed: Expected exitcode 2, got 1 timeout.c:117: Test failed: Got the wrong result. timeout.c:125: Test failed: Expected exitcode 0, got 1 timeout.c:126: Test failed: Unexpected stdout buffer size 0. timeout.c:127: Test failed: Unexpected stderr buffer size 77. timeout.c:130: Test failed: Expected exitcode 2, got 1 timeout.c:135: Test failed: Expected exitcode 2, got 1 timeout.c:140: Test failed: Expected exitcode 2, got 1
=== w1064v1507 (32 bit report) ===
timeout.exe: timeout.c:113: Test failed: Expected exitcode 2, got 1 timeout.c:117: Test failed: Got the wrong result. timeout.c:125: Test failed: Expected exitcode 0, got 1 timeout.c:126: Test failed: Unexpected stdout buffer size 0. timeout.c:127: Test failed: Unexpected stderr buffer size 77. timeout.c:130: Test failed: Expected exitcode 2, got 1 timeout.c:135: Test failed: Expected exitcode 2, got 1 timeout.c:140: Test failed: Expected exitcode 2, got 1
=== w1064v1809 (32 bit report) ===
timeout.exe: timeout.c:113: Test failed: Expected exitcode 2, got 1 timeout.c:117: Test failed: Got the wrong result. timeout.c:125: Test failed: Expected exitcode 0, got 1 timeout.c:126: Test failed: Unexpected stdout buffer size 0. timeout.c:127: Test failed: Unexpected stderr buffer size 77. timeout.c:130: Test failed: Expected exitcode 2, got 1 timeout.c:135: Test failed: Expected exitcode 2, got 1 timeout.c:140: Test failed: Expected exitcode 2, got 1
=== w1064_tsign (32 bit report) ===
timeout.exe: timeout.c:113: Test failed: Expected exitcode 2, got 1 timeout.c:117: Test failed: Got the wrong result. timeout.c:125: Test failed: Expected exitcode 0, got 1 timeout.c:126: Test failed: Unexpected stdout buffer size 0. timeout.c:127: Test failed: Unexpected stderr buffer size 77. timeout.c:130: Test failed: Expected exitcode 2, got 1 timeout.c:135: Test failed: Expected exitcode 2, got 1 timeout.c:140: Test failed: Expected exitcode 2, got 1
=== w10pro64 (32 bit report) ===
timeout.exe: timeout.c:113: Test failed: Expected exitcode 2, got 1 timeout.c:117: Test failed: Got the wrong result. timeout.c:125: Test failed: Expected exitcode 0, got 1 timeout.c:126: Test failed: Unexpected stdout buffer size 0. timeout.c:127: Test failed: Unexpected stderr buffer size 77. timeout.c:130: Test failed: Expected exitcode 2, got 1 timeout.c:135: Test failed: Expected exitcode 2, got 1 timeout.c:140: Test failed: Expected exitcode 2, got 1
=== w10pro64_en_AE_u8 (32 bit report) ===
timeout.exe: timeout.c:113: Test failed: Expected exitcode 2, got 1 timeout.c:117: Test failed: Got the wrong result. timeout.c:125: Test failed: Expected exitcode 0, got 1 timeout.c:126: Test failed: Unexpected stdout buffer size 0. timeout.c:127: Test failed: Unexpected stderr buffer size 77. timeout.c:130: Test failed: Expected exitcode 2, got 1 timeout.c:135: Test failed: Expected exitcode 2, got 1 timeout.c:140: Test failed: Expected exitcode 2, got 1
=== w11pro64 (32 bit report) ===
timeout.exe: timeout.c:113: Test failed: Expected exitcode 2, got 1 timeout.c:117: Test failed: Got the wrong result. timeout.c:125: Test failed: Expected exitcode 0, got 1 timeout.c:126: Test failed: Unexpected stdout buffer size 0. timeout.c:127: Test failed: Unexpected stderr buffer size 77. timeout.c:130: Test failed: Expected exitcode 2, got 1 timeout.c:135: Test failed: Expected exitcode 2, got 1 timeout.c:140: Test failed: Expected exitcode 2, got 1
=== w7pro64 (64 bit report) ===
timeout.exe: timeout.c:113: Test failed: Expected exitcode 2, got 1 timeout.c:117: Test failed: Got the wrong result. timeout.c:125: Test failed: Expected exitcode 0, got 1 timeout.c:126: Test failed: Unexpected stdout buffer size 0. timeout.c:127: Test failed: Unexpected stderr buffer size 77. timeout.c:130: Test failed: Expected exitcode 2, got 1 timeout.c:135: Test failed: Expected exitcode 2, got 1 timeout.c:140: Test failed: Expected exitcode 2, got 1
=== w864 (64 bit report) ===
timeout.exe: timeout.c:113: Test failed: Expected exitcode 2, got 1 timeout.c:117: Test failed: Got the wrong result. timeout.c:125: Test failed: Expected exitcode 0, got 1 timeout.c:126: Test failed: Unexpected stdout buffer size 0. timeout.c:127: Test failed: Unexpected stderr buffer size 77. timeout.c:130: Test failed: Expected exitcode 2, got 1 timeout.c:135: Test failed: Expected exitcode 2, got 1 timeout.c:140: Test failed: Expected exitcode 2, got 1
=== w1064v1507 (64 bit report) ===
timeout.exe: timeout.c:113: Test failed: Expected exitcode 2, got 1 timeout.c:117: Test failed: Got the wrong result. timeout.c:125: Test failed: Expected exitcode 0, got 1 timeout.c:126: Test failed: Unexpected stdout buffer size 0. timeout.c:127: Test failed: Unexpected stderr buffer size 77. timeout.c:130: Test failed: Expected exitcode 2, got 1 timeout.c:135: Test failed: Expected exitcode 2, got 1 timeout.c:140: Test failed: Expected exitcode 2, got 1
=== w1064v1809 (64 bit report) ===
timeout.exe: timeout.c:113: Test failed: Expected exitcode 2, got 1 timeout.c:117: Test failed: Got the wrong result. timeout.c:125: Test failed: Expected exitcode 0, got 1 timeout.c:126: Test failed: Unexpected stdout buffer size 0. timeout.c:127: Test failed: Unexpected stderr buffer size 77. timeout.c:130: Test failed: Expected exitcode 2, got 1 timeout.c:135: Test failed: Expected exitcode 2, got 1 timeout.c:140: Test failed: Expected exitcode 2, got 1
=== w1064_2qxl (64 bit report) ===
timeout.exe: timeout.c:113: Test failed: Expected exitcode 2, got 1 timeout.c:117: Test failed: Got the wrong result. timeout.c:125: Test failed: Expected exitcode 0, got 1 timeout.c:126: Test failed: Unexpected stdout buffer size 0. timeout.c:127: Test failed: Unexpected stderr buffer size 77. timeout.c:130: Test failed: Expected exitcode 2, got 1 timeout.c:135: Test failed: Expected exitcode 2, got 1 timeout.c:140: Test failed: Expected exitcode 2, got 1
=== w1064_adm (64 bit report) ===
timeout.exe: timeout.c:113: Test failed: Expected exitcode 2, got 1 timeout.c:117: Test failed: Got the wrong result. timeout.c:125: Test failed: Expected exitcode 0, got 1 timeout.c:126: Test failed: Unexpected stdout buffer size 0. timeout.c:127: Test failed: Unexpected stderr buffer size 77. timeout.c:130: Test failed: Expected exitcode 2, got 1 timeout.c:135: Test failed: Expected exitcode 2, got 1 timeout.c:140: Test failed: Expected exitcode 2, got 1
=== w1064_tsign (64 bit report) ===
timeout.exe: timeout.c:113: Test failed: Expected exitcode 2, got 1 timeout.c:117: Test failed: Got the wrong result. timeout.c:125: Test failed: Expected exitcode 0, got 1 timeout.c:126: Test failed: Unexpected stdout buffer size 0. timeout.c:127: Test failed: Unexpected stderr buffer size 77. timeout.c:130: Test failed: Expected exitcode 2, got 1 timeout.c:135: Test failed: Expected exitcode 2, got 1 timeout.c:140: Test failed: Expected exitcode 2, got 1
=== w10pro64 (64 bit report) ===
timeout.exe: timeout.c:113: Test failed: Expected exitcode 2, got 1 timeout.c:117: Test failed: Got the wrong result. timeout.c:125: Test failed: Expected exitcode 0, got 1 timeout.c:126: Test failed: Unexpected stdout buffer size 0. timeout.c:127: Test failed: Unexpected stderr buffer size 77. timeout.c:130: Test failed: Expected exitcode 2, got 1 timeout.c:135: Test failed: Expected exitcode 2, got 1 timeout.c:140: Test failed: Expected exitcode 2, got 1
=== w11pro64_amd (64 bit report) ===
timeout.exe: timeout.c:113: Test failed: Expected exitcode 2, got 1 timeout.c:117: Test failed: Got the wrong result. timeout.c:125: Test failed: Expected exitcode 0, got 1 timeout.c:126: Test failed: Unexpected stdout buffer size 0. timeout.c:127: Test failed: Unexpected stderr buffer size 77. timeout.c:130: Test failed: Expected exitcode 2, got 1 timeout.c:135: Test failed: Expected exitcode 2, got 1 timeout.c:140: Test failed: Expected exitcode 2, got 1
=== debian11b (64 bit WoW report) ===
user32: win.c:4070: Test failed: Expected active window 0000000004760144, got 0000000000000000. win.c:4071: Test failed: Expected focus window 0000000004760144, got 0000000000000000.
On Thu Nov 21 10:17:47 2024 +0000, Michele Dionisio wrote:
changed this line in [version 3 of the diff](/wine/wine/-/merge_requests/6869/diffs?diff_id=144426&start_sha=551024b267dc669f76653d133ac20a9eeedb6958#8f9bcaf39f772b17546796cbcaeb6ae379ac23b6_2_2)
done
On Thu Nov 21 14:06:11 2024 +0000, Michele Dionisio wrote:
changed this line in [version 6 of the diff](/wine/wine/-/merge_requests/6869/diffs?diff_id=144499&start_sha=2c36bbfd76f5b28b489c87bd4781c50743f722ef#8c3e8649852b7e3812c8229951f288cd6783502f_94_92)
done
On Thu Nov 21 14:20:54 2024 +0000, eric pouech wrote:
STRING_END looks rather useless to me (doesn't require translation)
done
On Thu Nov 21 14:20:54 2024 +0000, eric pouech wrote:
a quick test under windows 10 doesn't seem to match the return values I get 0 for a normal run (or termination by any key except ctrl-c) 1 for command line syntax error, and ctrl-c being hit in /nobreak mode and STATUS_CTRL_C_EXIT when ctrl-c being hit without /nobreak mode
done
On Thu Nov 21 14:06:11 2024 +0000, Michele Dionisio wrote:
changed this line in [version 6 of the diff](/wine/wine/-/merge_requests/6869/diffs?diff_id=144499&start_sha=2c36bbfd76f5b28b489c87bd4781c50743f722ef#8c3e8649852b7e3812c8229951f288cd6783502f_101_101)
done
thanks for taking the time to add the tests and update the MR
unfortunately, there's still a couple of failures on native for the tests
see the "Test summary" drop down list in the MR (or https://testbot.winehq.org/JobDetails.pl?Key=149835 which covers more Windows version, but with similar results)