tests: merge clients into libtests, drop duplicate code#18079
Closed
vszakats wants to merge 66 commits intocurl:masterfrom
Closed
tests: merge clients into libtests, drop duplicate code#18079vszakats wants to merge 66 commits intocurl:masterfrom
vszakats wants to merge 66 commits intocurl:masterfrom
Conversation
4643cd3 to
f200448
Compare
This comment was marked as resolved.
This comment was marked as resolved.
51f0d2e to
6c6fb3d
Compare
``` URL: https://localhost:56789/push/data1 E ================================================================= E ==67234==ERROR: AddressSanitizer: stack-use-after-return on address 0x7f8d60f000e0 at pc 0x55ed61e18b5a bp 0x7fff19e724f0 sp 0x7fff19e724e8 E READ of size 4 at 0x7f8d60f000e0 thread T0 E /usr/bin/llvm-symbolizer-18: /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4: no version information available (required by /usr/bin/llvm-symbolizer-18) E /usr/bin/llvm-symbolizer-18: symbol lookup error: /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4: undefined symbol: __asan_option_detect_stack_use_after_return E ==67234==WARNING: Can't read from symbolizer at fd 5 E <<------------------------------------------------------- ``` https://github.com/curl/curl/actions/runs/16598378195/job/46950868217?pr=18079
jhauga
added a commit
to jhauga/curl
that referenced
this pull request
Jul 30, 2025
* tests: merge clients into libtests, drop duplicate code libtests and clients were built the same way after recent overhauls. libtests are used by runtests, clients by pytests. Merge clients into libtests, aligning their entry function signature, dropping common utility functions, and simplifying the build. Note: After this patch `CURLDEBUG` applies to cli tests, when enabled. Also: - lib552: drop local copy-paste debug callback in favor of testtrace. - lib552: drop local copy-paste dump function in favor of testtrace. - clients: use `long` for HTTP version, drop casts. - clients: replace local dump function in favor of testrace clone. - sync cli test entry function prototype with libtests'. - h2_serverpush: replace local trace callback with testtrace. - de-duplicate 3 websocket close, ping, ping, functions. Kept the pong iteration from `ws_pingpong`. Note: the pong clone in `lib2304` was returning an error when `curl_ws_recv()` returned non-zero and the payload matched the expected one anyway. After this patch, this case returns success, as it does in `ws_pingpong`. `lib2304` keeps passing, but I'm not sure if the previous behavior was intentional. - display full value in websocket close, ping, pong, drop casts. Closes curl#18079 * cmake: defer building `unitprotos.h` till a test target needs it Follow-up to c9bb9cd curl#17750 Ref: curl#17750 (comment) Closes curl#18086 * curl: add -h cheat-sheet using curl-cheat-sheet as text Resolve failing checks. --------- Co-authored-by: Viktor Szakats <commit@vsz.me>
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.
libtests and clients were built the same way after recent overhauls.
libtests are used by runtests, clients by pytests.
Merge clients into libtests, aligning their entry function signature,
dropping common utility functions, and simplifying the build.
Note: After this patch
CURLDEBUGapplies to cli tests, when enabled.Also:
longfor HTTP version, drop casts.iteration from
ws_pingpong. Note: the pong clone inlib2304wasreturning an error when
curl_ws_recv()returned non-zero andthe payload matched the expected one anyway. After this patch, this
case returns success, as it does in
ws_pingpong.lib2304keeps passing, but I'm not sure if the previous behaviorwas intentional.
URLarg.to valid enum values, possibly adapt pytest for these.
libtests, tunit, units. [skip, it's okay]
/cc @icing