curl/tests/server
Viktor Szakats 9463769f2e
tests: reformat error messages to avoid tripping MSBuild
Change the format of error messages sent to stderr from tests and test
servers. As a workaround to avoid triggering Visual Studio's MSBuild
tool's built-in regexp matcher, and making it mark builds failed for
reasons we don't want them to hard fail.

Roughly, the pattern to avoid is the word "error" (case-insensitive)
in the same line with a colon `:`.

It affected GHA/windows MSVC CI jobs, causing flakiness:
```
CUSTOMBUILD : fopen() failed with error : 13 Permission denied [D:\a\curl\curl\bld\tests\test-ci.vcxproj]
  Error opening file: log/4/smtp_sockfilt.log
[...]
CUSTOMBUILD : fopen() failed with error : 13 Permission denied [D:\a\curl\curl\bld\tests\test-ci.vcxproj]
  Error opening file: log/8/imap_sockfilt.log
  Msg not logged: 00:18:10.656000 > 178 bytes data, server => client
[...]
  TESTDONE: 1629 tests out of 1634 reported OK: 99%
  Building Custom Rule D:/a/curl/curl/tests/CMakeLists.txt
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): error MSB8066: Custom build for 'D:\a\curl\curl\bld\CMakeFiles\621f80ddbb0fa48179f056ca77842ff0\test-ci.rule;D:\a\curl\curl\tests\CMakeLists.txt' exited with code -1. [D:\a\curl\curl\bld\tests\test-ci.vcxproj]
Error: Process completed with exit code 1.
```
Ref: https://github.com/curl/curl/actions/runs/13643149623/job/38137076210?pr=16490#step:14:3125
Ref: https://github.com/curl/curl/actions/runs/13688765792/job/38277961720?pr=16582#step:14:1717

The `IgnoreStandardErrorWarningFormat="true"` MSBuild Exec option
controls this behavior:
https://learn.microsoft.com/visualstudio/msbuild/exec-task#parameters
I couldn't figure out a way to apply it to CMake builds.

MSBuid pattern matching rules:
353c0f3d37/src/Shared/CanonicalError.cs
https://learn.microsoft.com/visualstudio/msbuild/msbuild-diagnostic-format-for-tasks

Note: There may be further error messages output from runtests scripts,
that use this format, which are not explicitly fatal. They may need
future fixes.

Thanks-to: Dion Williams
Ref: https://github.com/curl/curl/discussions/14854#discussioncomment-12382190
Ref: https://github.com/curl/curl/discussions/14854#discussioncomment-12395224

Closes #16583
2025-03-06 20:09:29 +01:00
..
.checksrc checksrc: use 'banfunc' proper in more places 2025-01-13 09:10:58 +01:00
.gitignore build: drop unused getpart tool 2025-02-25 01:52:13 +01:00
base64.pl copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
CMakeLists.txt addrinfo: add curl macro to avoid redefining foreign symbols 2025-02-13 12:46:39 +01:00
disabled.c asyn-thread: use c-ares to resolve HTTPS RR 2025-01-25 23:46:14 +01:00
getpart.c build: set -O3 and tune WinCE in CI, fix getpart, vtls_scache fallouts 2025-02-26 21:23:11 +01:00
getpart.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
Makefile.am tests: fix enum/int confusion (Intel C), fix autotools CFLAGS for servers 2025-02-13 12:46:40 +01:00
Makefile.inc build: tidy-ups around inet_pton 2025-03-05 03:10:45 +01:00
mqttd.c tests: reformat error messages to avoid tripping MSBuild 2025-03-06 20:09:29 +01:00
resolve.c tests/server: round of tidy-ups 2025-03-04 04:17:44 +01:00
rtspd.c tests: reformat error messages to avoid tripping MSBuild 2025-03-06 20:09:29 +01:00
server_setup.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
server_sockaddr.h build: prefer USE_IPV6 macro internally (was: ENABLE_IPV6) 2024-04-13 08:33:26 +00:00
sockfilt.c tests: reformat error messages to avoid tripping MSBuild 2025-03-06 20:09:29 +01:00
socksd.c tests: reformat error messages to avoid tripping MSBuild 2025-03-06 20:09:29 +01:00
sws.c tests: reformat error messages to avoid tripping MSBuild 2025-03-06 20:09:29 +01:00
tftp.h tests: tidy up types in server code 2024-05-13 11:16:26 +02:00
tftpd.c tests: reformat error messages to avoid tripping MSBuild 2025-03-06 20:09:29 +01:00
util.c tests: reformat error messages to avoid tripping MSBuild 2025-03-06 20:09:29 +01:00
util.h tests/server: round of tidy-ups 2025-03-04 04:17:44 +01:00