Skip to content

lib557: exclude three floating point test cases for VS2013 and earlier - #23377

Closed
vszakats wants to merge 1 commit into
curl:masterfrom
vszakats:t557-vs2013
Closed

vszakats wants to merge 1 commit into
curl:masterfrom
vszakats:t557-vs2013

Conversation

@vszakats

@vszakats vszakats commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

curl's printf relies on the CRT to print floating point numbers. The old
(pre-UCRT) CRT used by VS2013 and earlier toolchains behave differently
than expected. Exclude them to make the test pass with these toolchains.

Also:

  • output double conversion results to stdout to make it appear in CI
    logs.

Test failures as seen with VS2013:

test 0557 [curl_mprintf() testing]

   557: stdout FAILED:
  --- log/1/check-expected
  +++ log/1/check-generated
  @@ -6,7 +6,12 @@
   All curl_mprintf() signed long tests OK![LF]
   All curl_mprintf() curl_off_t tests OK![LF]
   All curl_mprintf() strings tests OK![LF]
  -All float strings tests OK![LF]
  +sprintf line 1117 failed:[LF]
  +we      ''[LF]
  +system: '9.000000'[LF]
  +MISMATCH (suffix): %.17Le curl=1.23456789012345670e+000 libc=e+00[LF]
  +MISMATCH (suffix): %.17LE curl=1.23456789012345670E+000 libc=E+00[LF]
  +test_float_formatting Failed![LF]
   All curl_mprintf() octal and hexadecimal tests OK![LF]
[...]

Ref: https://ci.appveyor.com/project/curlorg/curl/builds/54883622/job/pdynkxfjxtfhlomb#L949

Follow-up to bdda3a2 #22706
Follow-up to 48322e9 #22719

Cherry-picked from #23306

…earlier

curl's printf relies on the CRT to print floating point numbers. The old
(pre-UCRT) CRT used by VS2013 and earlier toolchains behave differently
than expected. Exclude them to make the test pass with these toolchains.

As seen with VS2013:
```
test 0557 [curl_mprintf() testing]

   557: stdout FAILED:
  --- log/1/check-expected
  +++ log/1/check-generated
  @@ -6,7 +6,12 @@
   All curl_mprintf() signed long tests OK![LF]
   All curl_mprintf() curl_off_t tests OK![LF]
   All curl_mprintf() strings tests OK![LF]
  -All float strings tests OK![LF]
  +sprintf line 1117 failed:[LF]
  +we      ''[LF]
  +system: '9.000000'[LF]
  +MISMATCH (suffix): %.17Le curl=1.23456789012345670e+000 libc=e+00[LF]
  +MISMATCH (suffix): %.17LE curl=1.23456789012345670E+000 libc=E+00[LF]
  +test_float_formatting Failed![LF]
   All curl_mprintf() octal and hexadecimal tests OK![LF]
   testing a string and -443 is super fun and 9876543[LF]
   All v-functions test OK![LF
```
Ref: https://ci.appveyor.com/project/curlorg/curl/builds/54883622/job/pdynkxfjxtfhlomb#L949

Cherry-picked from curl#23306

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 blocking issues were identified.

0 open findings

What changed in this PR

Updates lib557 to handle legacy MSVC CRT floating-point behavior and improve CI diagnostics.

Changes:

  • Excludes unsupported floating-point cases for VS2013 and earlier.
  • Prints conversion mismatches to stdout.
  • Reports the active floating-point test count.
File Description
tests/​libtest/​lib557.c Adjusts floating-point test coverage and diagnostics for legacy MSVC CRT behavior.

🧠 Review effort: Lite


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

@vszakats vszakats changed the title lib557: exclude unsupported floating point test cases for VS2013 and earlier lib557: exclude three floating point test cases for VS2013 and earlier Oct 12, 2026

@bagder bagder left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Unexpected, but a fair fix methinks.

@vszakats vszakats closed this in 8cdee8a Oct 12, 2026
@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
@vszakats
vszakats deleted the t557-vs2013 branch October 20, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Windows Windows-specific

Development

Successfully merging this pull request may close these issues.

3 participants