Skip to content

test1119, 1167: disable MSYS2 argument conversion - #23339

Closed
vszakats wants to merge 2 commits into
curl:masterfrom
vszakats:msys2-tests-fix
Closed

vszakats wants to merge 2 commits into
curl:masterfrom
vszakats:msys2-tests-fix

Conversation

@vszakats

@vszakats vszakats commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

To fix failing in all/most AppVeyor CI jobs regardless of VS or OS
version. CMake 3.19.8-4.2.1 with Visual Studio generator.

=== Start of file stderr1119
   Microsoft (R) C/C++ Optimizing Compiler Version 19.51.36248 for x64
   Copyright (C) Microsoft Corporation.  All rights reserved.
   DWIN32
c1 : fatal error C1083: Cannot open source file: 'C:/msys64/DWIN32': No such file or directory 
   D_WINDOWS
c1 : fatal error C1083: Cannot open source file: 'C:/msys64/D_WINDOWS': No such file or directory 
   curl.h
   Error preprocessing C:/projects/curl/tests/../include/curl/curl.h at C:/projects/curl/tests/test1119.pl line 79.
=== End of file stderr1119

Ref: https://ci.appveyor.com/project/curlorg/curl/builds/54868644/job/mxwd9iewudo1d60x?fullLog=true#L2189

_bld/tests/configurehelp.pm with
VS2026, Debug, x64, !ssl, Static, Build-tests:

package configurehelp;
[...]
$Cpreprocessor = '"C:/Program Files/Microsoft Visual Studio/18/Community/VC/Tools/MSVC/14.51.36231/bin/Hostx64/x64/cl.exe"
    -E /DWIN32 /D_WINDOWS
    -IC:/projects/curl/include -IC:/projects/curl/_bld/lib -IC:/projects/curl/lib';

Ref: https://ci.appveyor.com/project/curlorg/curl/builds/54869181/job/ssl908dghu6cu3ny?fullLog=true#L203

Ref: https://ci.appveyor.com/project/curlorg/curl/builds/54868644
Cherry-picked from #23306


Not sure why is this happening here, and why it isn't (and never
was AFAIR) happening in GHA. Maybe due to the Visual Studio
generator? But I can't remeber this being an issue while using
that generator in GHA. These /-prefixed options are added by
CMake via it Plaftorm/Windows-MSVC.cmake module.

GHA VS2026 x64 (used Ninja Multi-config) for comparison:

package configurehelp;

use strict;
use warnings;
use Exporter;

use vars qw(
    @ISA
    @EXPORT_OK
    $Cpreprocessor
    );

@ISA = qw(Exporter);

@EXPORT_OK = qw(
    $Cpreprocessor
    );

$Cpreprocessor = '"C:/PROGRA~1/MICROS~2/18/Enterprise/vc/tools/msvc/14.51.36231/bin/Hostx64/x64/cl.exe"
  -E  -DCURL_DEBUG_NO_WIN32_WND -external:W0
  -external:IC:/PROGRA~1/MICROS~2/18/Enterprise/vc/tools/msvc/14.51.36231/include
  -external:IC:/PROGRA~2/WI3CF2~1/10/include/10.0.26100.0/shared
  -external:IC:/PROGRA~2/WI3CF2~1/10/include/10.0.26100.0/ucrt
  -external:IC:/PROGRA~2/WI3CF2~1/10/include/10.0.26100.0/um
  -external:IC:/PROGRA~2/WI3CF2~1/10/include/10.0.26100.0/km
  -ID:/a/curl/curl/include -ID:/a/curl/curl/bld/lib -ID:/a/curl/curl/lib';

Ref: https://github.com/curl/curl/actions/runs/38006579668/job/114076678116#step:10:214

CM VS2015, Debug, x64, Schannel, Static, Build-tests
```
test 1119 [Verify that symbols-in-versions and headers are in sync]

   1119: stdout FAILED:
  --- log/2/check-expected	2026-10-09 20:05:57.334260400 +0000
  +++ log/2/check-generated	2026-10-09 20:05:57.334260400 +0000
  @@ -1 +0,0 @@
  -OK[LF]
  == Contents of files in the log/2/ directory after test 1119
  === Start of file check-expected
   OK[LF]
  === End of file check-expected
  === Start of file commands.log
   /usr/bin/perl -I. -IC:/projects/curl/tests C:/projects/curl/tests/test1119.pl C:/projects/curl/tests/.. ../include/curl > log/2/stdout1119 2> log/2/stderr1119
  === End of file commands.log
  === Start of file server.cmd
   Testnum 1119
  === End of file server.cmd
  === Start of file stderr1119
   Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24241.7 for x64
   Copyright (C) Microsoft Corporation.  All rights reserved.
   DWIN32
c1 : fatal error C1083: Cannot open source file: 'C:/msys64/DWIN32': No such file or directory [C:\projects\curl\_bld\tests\test-ci.vcxproj]
   D_WINDOWS
c1 : fatal error C1083: Cannot open source file: 'C:/msys64/D_WINDOWS': No such file or directory [C:\projects\curl\_bld\tests\test-ci.vcxproj]
   curl.h
   Error preprocessing C:/projects/curl/tests/../include/curl/curl.h at C:/projects/curl/tests/test1119.pl line 79.
  === End of file stderr111
```
https://ci.appveyor.com/project/curlorg/curl/builds/54868644/job/rp2e32mj2v9l856w?fullLog=true
CM VS2015, Debug, x64, Schannel, Static, Build-tests
```
test 1167 [Verify curl prefix of public symbols in header files]

  /usr/bin/perl -I. -IC:/projects/curl/tests  returned 2, when expecting 0
   1167: exit FAILED
  == Contents of files in the log/9/ directory after test 1167
  === Start of file commands.log
   /usr/bin/perl -I. -IC:/projects/curl/tests C:/projects/curl/tests/test1167.pl C:/projects/curl/tests/.. > log/9/stdout1167 2> log/9/stderr1167
  === End of file commands.log
  === Start of file server.cmd
   Testnum 1167
  === End of file server.cmd
  === Start of file stderr1167
   Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24241.7 for x64
   Copyright (C) Microsoft Corporation.  All rights reserved.
   DWIN32
c1 : fatal error C1083: Cannot open source file: 'C:/msys64/DWIN32': No such file or directory [C:\projects\curl\_bld\tests\test-ci.vcxproj]
   D_WINDOWS
c1 : fatal error C1083: Cannot open source file: 'C:/msys64/D_WINDOWS': No such file or directory [C:\projects\curl\_bld\tests\test-ci.vcxproj]
   curl.h
   Error preprocessing C:/projects/curl/tests/../include/curl/curl.h at C:/projects/curl/tests/test1167.pl line 116.
  === End of file stderr1167
```
https://ci.appveyor.com/project/curlorg/curl/builds/54868644/job/rp2e32mj2v9l856w?fullLog=true
https://ci.appveyor.com/project/curlorg/curl/builds/54868644/job/wor40aneg0kf7ko0
@testclutch

This comment was marked as outdated.

@vszakats vszakats added the Windows Windows-specific label Oct 9, 2026
@vszakats vszakats closed this in 2f3f99d Oct 10, 2026
@vszakats
vszakats deleted the msys2-tests-fix branch October 10, 2026 16:52
@vszakats
vszakats requested a lite review from Copilot October 10, 2026 16:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No unresolved issues were identified.

0 open findings

What changed in this PR

This PR prevents MSYS2 from converting MSVC preprocessor flags into invalid paths in tests 1119 and 1167.

Changes:

  • Scopes MSYS2_ARG_CONV_EXCL=* during preprocessing.
  • Applies the fix to both test scripts.
File Description
tests/​test1119.pl Disables argument conversion during preprocessing.
tests/​test1167.pl Disables argument conversion during preprocessing.

🧠 Review effort: Lite


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

vszakats added a commit that referenced this pull request Oct 12, 2026
Narrow the exclusion from `*` to `/D`, to fix certain build combinations
relying on the heuristics, but still fix the narrower case that we saw
breaking when using MSVC with CMake's Visual Studio generator, with
`/DINW32 /D_WINDOWS` passed to the compiler, which hit the heuristics by
default.

Tested via #23306:
https://ci.appveyor.com/project/curlorg/curl/builds/54881098

Ref: https://curl.se/dev/log.cgi?id=20261010032513-1037281
Reported-by: Marcel Raad
Fixes #23372
Follow-up to 2f3f99d #23339

Closes #23375
@vszakats vszakats mentioned this pull request Oct 16, 2026
9 of 10 tasks
vszakats added a commit that referenced this pull request Oct 18, 2026
- in jobs building tests, also run them.
- to maintain CI cycle times, only run unit tests by default, and run
  all (supported) tests in just one job, carefully selected to be the
  one running them the fastest.
  Per job, it takes ~15 seconds to run ~80 unit tests.
  It takes 5 minutes to run all (~1600) tests. Total job time 5.5-6
  minutes.
  If the full test run turns out to be annoying or grow slow, we disable
  or limit it to a subset of tests.
- run tests with `-j10` parallelism. It results in the fastest runs,
  based on tests.
- to avoid the MSBuild test breaker heuristics, and to improve
  performance, run tests by directly invoking `runtests.pl` (not via
  CMake -> MSBuild -> `runtests.pl`).
  It saves 10-40 seconds per full test run.
- when running directly via `runtests.pl`, exclude test 1119 and 1167.
  It's not compatible with Visual Studio generator builds.
- run the artifact upload in parallel with running tests.

Running Windows tests in multiple environments makes it more likely they
can run on local machines, too, also making them easier to debug.
AppVeyor also supports remote access via RDP, which may help debugging
notorious Windows issues live, with some luck of reproducing it in a run
with RDP access explicitly enabled beforehand.

Fixes/improvements via this PR, merged separately:

dc99e12 #23467 processhelp.pm: improve task info in trace output (Windows)
70f3f85 #23471 test1488: drop unused C preprocessor logic
af9d2dd #23336 cmake: fix preconditions for option `CURL_STATIC_CRT=ON`
adf8b78 #23428 setopt: fix setting `CURLWS_NOAUTOPONG` with compilers lacking C99 bool type
780405b #23416 tests: add `--dump-module-paths` debug option (Windows)
bc22977 #23400 msvc: replace debug CRT GUI popups with stderr output
87a1dc7 #23396 appveyor: minor improvements
67f3510 #23381 runtests: add `-S` option to show success logs
e9af987 #23378 tests/server: fix crashing with VS2013 and earlier
8cdee8a #23377 lib557: exclude three floating point test cases for VS2013 and earlier
1aac64a #23375 test1119, 1167: disable MSYS2 argument conversion narrowly
49f003f #23337 unit1664: add workaround for VS2019 16.3 - VS2022 17.4 x64 miscompile
b8f71d6 #23345 test428: skip when running on older MSYS2 versions
2f3f99d #23339 test1119, 1167: disable MSYS2 argument conversion
098d3a0 #23332 runtests: unset `CURL_MEMDEBUG` for curl requests made to the CI API
d3e7caf #23335 GHA/windows: drop unused `-ac` runtests options
2874cc6 #23317 mqttd: work around bogus VS2019 32-bit compiler warning
e8adc72 #23315 schannel: fix guard for old MSVC workaround

Follow-up to 41198e0 #20390

Closes #23306
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants