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 #18079
This commit is contained in:
Viktor Szakats
2025-07-29 09:53:14 +02:00
parent 952c929bdf
commit 00887aee8c
48 changed files with 541 additions and 1041 deletions

View File

@@ -5463,7 +5463,6 @@ AC_CONFIG_FILES([\
tests/libtest/Makefile \
tests/unit/Makefile \
tests/tunit/Makefile \
tests/client/Makefile \
tests/http/config.ini \
tests/http/Makefile \
packages/Makefile \