-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
tests/http/clients: drop hack and use curl_setup.h
again
#17642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Conversation
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
client: fixup curlx for static libcurl (like in libtests)
to avoid fallout with older mingw-w64 (dl-mingw, CM 6.4.0-i686 schannel !unity): ``` tests/http/clients/h2_pausing.c: In function 'cb': tests/http/clients/h2_pausing.c:58:21: error: unknown conversion type character 'l' in format [-Werror=format=] fprintf(stderr, "INFO: [%d] write, Content-Length %"CURL_FORMAT_CURL_OFF_T ^ tests/http/clients/h2_pausing.c:58:21: error: too many arguments for format [-Werror=format-extra-args] fprintf(stderr, "INFO: [%d] write, Content-Length %"CURL_FORMAT_CURL_OFF_T ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ tests/http/clients/h2_pausing.c:58:21: error: unknown conversion type character 'l' in format [-Werror=format=] fprintf(stderr, "INFO: [%d] write, Content-Length %"CURL_FORMAT_CURL_OFF_T ^ tests/http/clients/h2_pausing.c:58:21: error: too many arguments for format [-Werror=format-extra-args] fprintf(stderr, "INFO: [%d] write, Content-Length %"CURL_FORMAT_CURL_OFF_T ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from bld/tests/http/clients/clients.c:7:0: tests/http/clients/h2_upgrade_extreme.c: In function 'test_h2_upgrade_extreme': tests/http/clients/h2_upgrade_extreme.c:121:27: error: unknown conversion type character 'l' in format [-Werror=format=] fprintf(stderr, "transfer #%" CURL_FORMAT_CURL_OFF_T ^~~~~~~~~~~~~ tests/http/clients/h2_upgrade_extreme.c:121:27: error: format '%d' expects argument of type 'int', but argument 3 has type 'curl_off_t {aka long long int}' [-Werror=format=] tests/http/clients/h2_upgrade_extreme.c:121:27: error: too many arguments for format [-Werror=format-extra-args] tests/http/clients/h2_upgrade_extreme.c:121:27: error: unknown conversion type character 'l' in format [-Werror=format=] tests/http/clients/h2_upgrade_extreme.c:121:27: error: format '%d' expects argument of type 'int', but argument 3 has type 'curl_off_t {aka long long int}' [-Werror=format=] tests/http/clients/h2_upgrade_extreme.c:121:27: error: too many arguments for format [-Werror=format-extra-args] tests/http/clients/h2_upgrade_extreme.c:126:27: error: unknown conversion type character 'l' in format [-Werror=format=] fprintf(stderr, "transfer #%" CURL_FORMAT_CURL_OFF_T ^~~~~~~~~~~~~ tests/http/clients/h2_upgrade_extreme.c:126:27: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'curl_off_t {aka long long int}' [-Werror=format=] tests/http/clients/h2_upgrade_extreme.c:126:27: error: too many arguments for format [-Werror=format-extra-args] tests/http/clients/h2_upgrade_extreme.c:126:27: error: unknown conversion type character 'l' in format [-Werror=format=] tests/http/clients/h2_upgrade_extreme.c:126:27: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'curl_off_t {aka long long int}' [-Werror=format=] tests/http/clients/h2_upgrade_extreme.c:126:27: error: too many arguments for format [-Werror=format-extra-args] tests/http/clients/h2_upgrade_extreme.c:132:25: error: unknown conversion type character 'l' in format [-Werror=format=] fprintf(stderr, "transfer #%" CURL_FORMAT_CURL_OFF_T" retiring " ^~~~~~~~~~~~~ tests/http/clients/h2_upgrade_extreme.c:132:25: error: format '%d' expects argument of type 'int', but argument 3 has type 'curl_off_t {aka long long int}' [-Werror=format=] tests/http/clients/h2_upgrade_extreme.c:132:25: error: too many arguments for format [-Werror=format-extra-args] tests/http/clients/h2_upgrade_extreme.c:132:25: error: unknown conversion type character 'l' in format [-Werror=format=] tests/http/clients/h2_upgrade_extreme.c:132:25: error: format '%d' expects argument of type 'int', but argument 3 has type 'curl_off_t {aka long long int}' [-Werror=format=] tests/http/clients/h2_upgrade_extreme.c:132:25: error: too many arguments for format [-Werror=format-extra-args] In file included from bld/tests/http/clients/clients.c:10:0: tests/http/clients/tls_session_reuse.c: In function 'test_tls_session_reuse': tests/http/clients/tls_session_reuse.c:182:27: error: unknown conversion type character 'l' in format [-Werror=format=] fprintf(stderr, "transfer #%" CURL_FORMAT_CURL_OFF_T ^~~~~~~~~~~~~ tests/http/clients/tls_session_reuse.c:182:27: error: format '%d' expects argument of type 'int', but argument 3 has type 'curl_off_t {aka long long int}' [-Werror=format=] tests/http/clients/tls_session_reuse.c:182:27: error: too many arguments for format [-Werror=format-extra-args] tests/http/clients/tls_session_reuse.c:182:27: error: unknown conversion type character 'l' in format [-Werror=format=] tests/http/clients/tls_session_reuse.c:182:27: error: format '%d' expects argument of type 'int', but argument 3 has type 'curl_off_t {aka long long int}' [-Werror=format=] tests/http/clients/tls_session_reuse.c:182:27: error: too many arguments for format [-Werror=format-extra-args] tests/http/clients/tls_session_reuse.c:187:27: error: unknown conversion type character 'l' in format [-Werror=format=] fprintf(stderr, "transfer #%" CURL_FORMAT_CURL_OFF_T ^~~~~~~~~~~~~ tests/http/clients/tls_session_reuse.c:187:27: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'curl_off_t {aka long long int}' [-Werror=format=] tests/http/clients/tls_session_reuse.c:187:27: error: too many arguments for format [-Werror=format-extra-args] tests/http/clients/tls_session_reuse.c:187:27: error: unknown conversion type character 'l' in format [-Werror=format=] tests/http/clients/tls_session_reuse.c:187:27: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'curl_off_t {aka long long int}' [-Werror=format=] tests/http/clients/tls_session_reuse.c:187:27: error: too many arguments for format [-Werror=format-extra-args] tests/http/clients/tls_session_reuse.c:194:25: error: unknown conversion type character 'l' in format [-Werror=format=] fprintf(stderr, "transfer #%" CURL_FORMAT_CURL_OFF_T" retiring " ^~~~~~~~~~~~~ tests/http/clients/tls_session_reuse.c:194:25: error: format '%d' expects argument of type 'int', but argument 3 has type 'curl_off_t {aka long long int}' [-Werror=format=] tests/http/clients/tls_session_reuse.c:194:25: error: too many arguments for format [-Werror=format-extra-args] tests/http/clients/tls_session_reuse.c:194:25: error: unknown conversion type character 'l' in format [-Werror=format=] tests/http/clients/tls_session_reuse.c:194:25: error: format '%d' expects argument of type 'int', but argument 3 has type 'curl_off_t {aka long long int}' [-Werror=format=] tests/http/clients/tls_session_reuse.c:194:25: error: too many arguments for format [-Werror=format-extra-args] ``` https://github.com/curl/curl/actions/runs/15683475099/job/44180609118?pr=17641#step:12:248
macOS clang-tidy job, with `mk-unity.pl --embed`: ``` /Users/runner/work/curl/curl/bld/tests/http/clients/clients.c:38:10: error: '../curl_setup.h' file not found, did you mean 'curl_setup.h'? [clang-diagnostic-error] 38 | #include "../curl_setup.h" | ^~~~~~~~~~~~~~~~~ | "curl_setup.h" 1 error generated. ``` https://github.com/curl/curl/actions/runs/15690634385/job/44204694573?pr=17642#step:14:248
4 tasks
vszakats
added a commit
to vszakats/curl
that referenced
this pull request
Jun 17, 2025
Not necessary now that it uses `curl_setup.h`. Follow-up to 539d112 curl#17642
vszakats
added a commit
to vszakats/curl
that referenced
this pull request
Jun 19, 2025
Not necessary now that test clients #include `curl_setup.h`. Follow-up to 539d112 curl#17642
denandz
pushed a commit
to denandz/curl
that referenced
this pull request
Jun 21, 2025
Sync build properties with libtests. This allows accessing macros from `curl_config.h`, for feature flags. Smoothens out platform bumps, allowing to drop local replicas from client sources. It enables using Windows wrappers, e.g. for `fopen()`. Also fix client sources to use `curl_mfprintf()` where curl format strings are used. (To avoid build failure with older mingw-w64, e.g. 6.4.0 in CI.) Follow-up to 739c09c curl#17627 Closes curl#17642
denandz
pushed a commit
to denandz/curl
that referenced
this pull request
Jun 21, 2025
Not necessary now that test clients #include `curl_setup.h`. Follow-up to 539d112 curl#17642 Closes curl#17657
denandz
pushed a commit
to denandz/curl
that referenced
this pull request
Jun 21, 2025
Not necessary now that test clients #include `curl_setup.h`. Follow-up to 539d112 curl#17642 Closes curl#17668
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.
Sync build properties with libtests.
This allows accessing macros from
curl_config.h
, for feature flags.Smoothens out platform bumps, allowing to drop local replicas from
client sources. It enables using Windows wrappers, e.g. for
fopen()
.Also fix client sources to use
curl_mfprintf()
where curl formatstrings are used. (To avoid build failure with older mingw-w64, e.g.
6.4.0 in CI.)
Follow-up to 739c09c #17627