tests: set CURL_ENTROPY per test, not globally#17971
Closed
vszakats wants to merge 3 commits intocurl:masterfrom
Closed
tests: set CURL_ENTROPY per test, not globally#17971vszakats wants to merge 3 commits intocurl:masterfrom
CURL_ENTROPY per test, not globally#17971vszakats wants to merge 3 commits intocurl:masterfrom
Conversation
CURL_ENTROPY per test, not globally
CURL_ENTROPY per test, not globallyCURL_ENTROPY per test, not globally
CURL_ENTROPY per test, not globallyCURL_ENTROPY per test, not globally
1 task
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Setting
CURL_ENTROPYin debug-enabled builds overrides the code pathsresponsible for random number generation. To avoid masking issue there,
this patch moves
CURL_ENTROPYsettings to each test that requires it,and stop setting it by default for all tests (in
runner.pm).This makes it possible to catch random generator issues in debug-enabled
builds; extending test coverage.
To keep offering a well-defined state for tests, make
runner.pmdeletethe
CURL_ENTROPYenv, if present.Ref: #17970