First push with null patch, to get current gitlab runner result in [pipeline #42287](https://gitlab.winehq.org/bernhardu/wine/-/pipelines/42287). Unfortunately, did not fail this time.
Older examples are: - [job #157583](https://gitlab.winehq.org/wine/wine/-/jobs/157583#L2282) - [job #157314](https://gitlab.winehq.org/wine/wine/-/jobs/157314#L1957) - [job #157131](https://gitlab.winehq.org/wine/wine/-/jobs/157131#L2052) - [job #157068](https://gitlab.winehq.org/wine/wine/-/jobs/157068#L1955) - [job #157032](https://gitlab.winehq.org/wine/wine/-/jobs/157032#L2150) - [job #156785](https://gitlab.winehq.org/wine/wine/-/jobs/156785#L2112) - [job #156713](https://gitlab.winehq.org/wine/wine/-/jobs/156713#L2048) - [job 156677#](https://gitlab.winehq.org/wine/wine/-/jobs/156677#L2030)
So happens just a few times per day.
The value -1073741510 in `timeout.exe:timeout:06b4 done (-1073741510) in 5s 177B` equals to 0xC000013A, STATUS_CONTROL_C_EXIT. Therefore the assumption the ctrl-c from the test reaches sometimes the parent process.
With the patch activated, this [pipeline #42291](https://gitlab.winehq.org/bernhardu/wine/-/pipelines/42291).
-- v3: TEMP: gitlab: Just run timeout.exe with test-linux-32.
From: Bernhard Übelacker bernhardu@mailbox.org
Otherwise in the gitlab runner this test cannot finish. --- programs/timeout/tests/timeout.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/programs/timeout/tests/timeout.c b/programs/timeout/tests/timeout.c index bd99eb9e5e1..16bebf69988 100644 --- a/programs/timeout/tests/timeout.c +++ b/programs/timeout/tests/timeout.c @@ -130,10 +130,18 @@ static void _run_timeout_ctrlc(const char *file, int line, const char *option, D exitcode_expected, exitcode); }
+static BOOL WINAPI ctrl_handler(DWORD dwCtrlType) +{ + trace("Received dwCtrlType=%lu\n", dwCtrlType); + return TRUE; +} + static void test_ctrlc(void) { + SetConsoleCtrlHandler(ctrl_handler, TRUE); run_timeout_ctrlc("", STATUS_CONTROL_C_EXIT); run_timeout_ctrlc("/nobreak", 1); + SetConsoleCtrlHandler(ctrl_handler, FALSE); }
START_TEST(timeout)
From: Bernhard Übelacker bernhardu@mailbox.org
--- tools/gitlab/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/gitlab/test.yml b/tools/gitlab/test.yml index 2c56ca5cc78..d62615dc09c 100644 --- a/tools/gitlab/test.yml +++ b/tools/gitlab/test.yml @@ -75,7 +75,7 @@ test-linux-32: - job: build-linux script: - export WINETEST_COLOR=1 - - wine usr/local/lib/wine/i386-windows/winetest.exe -q -q -o - -J winetest.xml -n $EXCLUDE_TESTS + - wine usr/local/lib/wine/i386-windows/winetest.exe -q -q -o - -J winetest.xml timeout.exe artifacts: when: always paths:
eric pouech (@epo) commented about programs/timeout/tests/timeout.c:
exitcode_expected, exitcode);
}
+static BOOL WINAPI ctrl_handler(DWORD dwCtrlType) +{
- trace("Received dwCtrlType=%lu\n", dwCtrlType);
- return TRUE;
+}
static void test_ctrlc(void) {
- SetConsoleCtrlHandler(ctrl_handler, TRUE); run_timeout_ctrlc("", STATUS_CONTROL_C_EXIT); run_timeout_ctrlc("/nobreak", 1);
- SetConsoleCtrlHandler(ctrl_handler, FALSE);
that will unblock ctrl-c in this process and hence not prevent failure if ctrl-c is dispatched after this call
IMO, we have two options:
* disable ctrl-c before calling test_ctrlc() with a big comment (in main block) stating that after this point, ctrl-c shouldn't be reenabled (and removing all calls to SetConsoleCtrlC in test_ctrlc and its helpers) * use an intermediate process so that spurious ctrl-events will not affect parent (intermediate process be created with CREATE_NEW_PROCESS_GROUP | CREATE_NEW_CONSOLE)
I don't expect many changes in the future for these tests, so first option sounds valid (second is way cleaner but requires a bit more work)