Skip to content

GHA/macos: add Rustls, aws-lc jobs#17963

Closed
vszakats wants to merge 17 commits intocurl:masterfrom
vszakats:gha-macos-rustls
Closed

GHA/macos: add Rustls, aws-lc jobs#17963
vszakats wants to merge 17 commits intocurl:masterfrom
vszakats:gha-macos-rustls

Conversation

@vszakats
Copy link
Member

@vszakats vszakats commented Jul 18, 2025

Bind them to the (arbitrary choice of) Apple clang and gcc compilers,
respectively.

Also:

  • bind existing mbedTLS job to the llvm compiler, to keep the number of
    jobs the same as before this patch.
  • move OpenLDAP from mbedTLS over to LibreSSL to keep testing it with
    all 3 compilers.
  • simplify exclusions for clang-tidy and torture jobs.
  • tag clang-tidy and torture jobs via install_steps.
    To avoid keeping around special bool fields.

@vszakats vszakats added TLS CI Continuous Integration appleOS specific to an Apple operating system labels Jul 18, 2025
@vszakats vszakats changed the title GHA/macos: add Rustls job GHA/macos: add Rustls and aws-lc jobs Jul 18, 2025
@vszakats vszakats changed the title GHA/macos: add Rustls and aws-lc jobs GHA/macos: add Rustls, aws-lc jobs Jul 19, 2025
vszakats added 2 commits July 19, 2025 11:49
To keep the number of jobs the same as before this patch, and keep
testing openldap with all 3 compilers.
vszakats added 4 commits July 19, 2025 12:02
by moving it the `install_steps` instead of having its own special bool field
Found while making a typo and accidentally running tests in the MultiSSL job.

```
test 1308...[formpost tests]

libtests returned 44, when expecting 0
 1308: exit FAILED
== Contents of files in the log/15/ dir after test 1308
=== Start of file commands.log
 ./libtest/libtests lib1308 log/15/test-1308 > log/15/stdout1308 2> log/15/stderr1308
=== End of file commands.log
=== Start of file server.cmd
 Testnum 1308
=== End of file server.cmd
=== Start of file stderr1308
 URL: log/15/test-1308
 /Users/runner/work/curl/curl/tests/libtest/lib1308.c:70 Assertion 'res == 0' FAILED: curl_formget returned error
 /Users/runner/work/curl/curl/tests/libtest/lib1308.c:72 Assertion 'total_size == 518' FAILED: curl_formget got wrong size back
 /Users/runner/work/curl/curl/tests/libtest/lib1308.c:88 Assertion 'res == 0' FAILED: curl_formget returned error
 /Users/runner/work/curl/curl/tests/libtest/lib1308.c:89 Assertion 'total_size == 899' FAILED: curl_formget got wrong size back
 Test ended with result 44
=== End of file stderr1308
=== Start of file test-1308
 Piece of the file that is to uploaded as a formpost
```
https://github.com/curl/curl/actions/runs/16387468868/job/46309039397#step:16:2515
@vszakats
Copy link
Member Author

vszakats commented Jul 19, 2025

Fallout while shuffling existing jobs to keep the number of jobs unchanged:

wolfSSL job fails in pytest after enabling OpenLDAP in it:
Before: https://github.com/curl/curl/actions/runs/16357771308/job/46219844170
After: https://github.com/curl/curl/actions/runs/16387468868/job/46309039398

Same job with mbedTLS runs pytest with no issues:
https://github.com/curl/curl/actions/runs/16387693424/job/46309536377?pr=17963

/cc @icing

Also a new test 1308 failure after accidentally running it in the MultiSSL job:
https://github.com/curl/curl/actions/runs/16387468868/job/46309039397#step:16:2515

@icing
Copy link
Contributor

icing commented Jul 19, 2025

The pytest failure is an unexpected 2nd connection was opened when all requests should have been served on the same one. The log shows:

09:58:05.646555 [0-0] * Connection #0 to host proxy.http.curl.se left intact
09:58:10.665531 [1-x] * RESOLVE proxy.http.curl.se:54350 - old addresses discarded

where there is nothing happening for 5 seconds and then curl tries to reuse the existing connection, but the server closed this due to timeout.

This looks like CI was very busy and just did not give the curl process enough cpu. We can try mitigating this with longer timeouts on the server.

icing added a commit to icing/curl that referenced this pull request Jul 19, 2025
When CI is not able to give clients enough cpu, the default Apache
KeepAliveTimeout of 5 seconds may trigger and cause tests to fail.

Increase the timeout to 30 seconds for reliability.

refs curl#17963

e Bitte geben Sie eine Commit-Beschreibung für Ihre Änderungen ein. Zeilen,
@icing
Copy link
Contributor

icing commented Jul 19, 2025

You may want to try this again by integrating #17968.

@github-actions github-actions bot added the tests label Jul 19, 2025
@vszakats
Copy link
Member Author

@icing Thanks a lot for your quick feedback, and fix! Applying #17968 made pytest finish successfully.

It makes we wonder what causes the extra connection and delay.
With OpenLDAP built-in, pytests take 7x the time than without:
48s without OpenLDAP: https://github.com/curl/curl/actions/runs/16357771308/job/46219844170
5m27s with OpenLDAP: https://github.com/curl/curl/actions/runs/16388447496/job/46311202070?pr=17963

It also affects mbedTLS (though it passed without the timeout bump):
5m: https://github.com/curl/curl/actions/runs/16387693424/job/46309536377?pr=17963

I expected OpenLDAP to not interfere with HTTP.

@icing
Copy link
Contributor

icing commented Jul 19, 2025

I expected OpenLDAP to not interfere with HTTP.

I would expect the same. Worth a detailed look.

vszakats added a commit to vszakats/curl that referenced this pull request Jul 19, 2025
To fix test 1308 in MultiSSL builds.

Failure was caused by the random number generator virtual function being
NULL, instead of pointing to the implementation in the runtime-selected
TLS backend. This could happen in MultiSSL builds when a functionality
was asking for a random number without triggering a VTLS function table
initialization first. Such functionality is MIME, or form data via MIME.

Fixing:
```
test 1308...[formpost tests]

libtests returned 44, when expecting 0
 1308: exit FAILED
[...]
=== Start of file stderr1308
 URL: log/3/test-1308
 /Users/runner/work/curl/curl/tests/libtest/lib1308.c:70 Assertion 'res == 0' FAILED: curl_formget returned error
 /Users/runner/work/curl/curl/tests/libtest/lib1308.c:72 Assertion 'total_size == 518' FAILED: curl_formget got wrong size back
 /Users/runner/work/curl/curl/tests/libtest/lib1308.c:88 Assertion 'res == 0' FAILED: curl_formget returned error
 /Users/runner/work/curl/curl/tests/libtest/lib1308.c:89 Assertion 'total_size == 899' FAILED: curl_formget got wrong size back
```
Ref: https://github.com/curl/curl/actions/runs/16387693424/job/46309536359?pr=17963#step:16:2515

Bug: curl#17963 (comment)
@vszakats vszakats closed this in 319d27e Jul 19, 2025
@vszakats vszakats deleted the gha-macos-rustls branch July 19, 2025 20:39
vszakats added a commit that referenced this pull request Jul 20, 2025
To fix test 1308 in MultiSSL builds.

Failure was caused by the random number generator virtual function being
NULL, instead of pointing to the implementation in the runtime-selected
TLS backend. This could happen in MultiSSL builds when a functionality
was asking for a random number without triggering a VTLS function table
initialization first. Such functionality is MIME, or form data via MIME.

The reason CI did not catch it in an earlier MultiSSL GHA/windows job,
is that it was a debug-enabled one. In debug-enabled builds the test
runner was overriding the random number generator for all tests.

Fixed this by moving the override to the tests requiring it, via
1fcf225 #17971, enabling debug builds
to catch this issue.

Enable MultiSSL in two CI jobs, to verify this patch.

Fixing:
```
test 1308...[formpost tests]

libtests returned 44, when expecting 0
 1308: exit FAILED
[...]
=== Start of file stderr1308
 URL: log/3/test-1308
 tests/libtest/lib1308.c:70 Assertion 'res == 0' FAILED: curl_formget returned error
 tests/libtest/lib1308.c:72 Assertion 'total_size == 518' FAILED: curl_formget got wrong size back
 tests/libtest/lib1308.c:88 Assertion 'res == 0' FAILED: curl_formget returned error
 tests/libtest/lib1308.c:89 Assertion 'total_size == 899' FAILED: curl_formget got wrong size back
```
Ref: https://github.com/curl/curl/actions/runs/16387693424/job/46309536359?pr=17963#step:16:2515

Bug: #17963 (comment)

Closes #17970
bagder pushed a commit that referenced this pull request Jul 20, 2025
When CI is not able to give clients enough cpu, the default Apache
KeepAliveTimeout of 5 seconds may trigger and cause tests to fail.

Increase the timeout to 30 seconds for reliability.

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

Labels

appleOS specific to an Apple operating system CI Continuous Integration tests TLS

Development

Successfully merging this pull request may close these issues.

3 participants

Comments