]> git.ipfire.org Git - thirdparty/curl.git/commit
tests: merge clients into libtests, drop duplicate code
authorViktor Szakats <commit@vsz.me>
Tue, 29 Jul 2025 07:53:14 +0000 (09:53 +0200)
committerViktor Szakats <commit@vsz.me>
Wed, 30 Jul 2025 00:38:13 +0000 (02:38 +0200)
commit00887aee8ca0efe0b40fa41b2a36e2d853d49b57
tree3e8e8127a9f8e88d5647f2fcb54ba9ccb1262288
parent952c929bdf70645ee263c45a19518ae976a0292d
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
48 files changed:
.github/workflows/windows.yml
configure.ac
tests/CMakeLists.txt
tests/Makefile.am
tests/client/.gitignore [deleted file]
tests/client/CMakeLists.txt [deleted file]
tests/client/Makefile.am [deleted file]
tests/client/Makefile.inc [deleted file]
tests/client/first.c [deleted file]
tests/client/first.h [deleted file]
tests/http/Makefile.am
tests/http/test_02_download.py
tests/http/test_07_upload.py
tests/http/test_08_caddy.py
tests/http/test_09_push.py
tests/http/test_17_ssl_use.py
tests/http/test_19_shutdown.py
tests/http/test_20_websockets.py
tests/http/testenv/client.py
tests/libtest/Makefile.inc
tests/libtest/cli_h2_pausing.c [moved from tests/client/h2_pausing.c with 87% similarity]
tests/libtest/cli_h2_serverpush.c [moved from tests/client/h2_serverpush.c with 81% similarity]
tests/libtest/cli_h2_upgrade_extreme.c [moved from tests/client/h2_upgrade_extreme.c with 93% similarity]
tests/libtest/cli_hx_download.c [moved from tests/client/hx_download.c with 95% similarity]
tests/libtest/cli_hx_upload.c [moved from tests/client/hx_upload.c with 95% similarity]
tests/libtest/cli_tls_session_reuse.c [moved from tests/client/tls_session_reuse.c with 89% similarity]
tests/libtest/cli_upload_pausing.c [moved from tests/client/upload_pausing.c with 87% similarity]
tests/libtest/cli_ws_data.c [moved from tests/client/ws_data.c with 92% similarity]
tests/libtest/cli_ws_pingpong.c [moved from tests/client/ws_pingpong.c with 57% similarity]
tests/libtest/first.c
tests/libtest/first.h
tests/libtest/lib1515.c
tests/libtest/lib1522.c
tests/libtest/lib1540.c
tests/libtest/lib1542.c
tests/libtest/lib1553.c
tests/libtest/lib1915.c
tests/libtest/lib2301.c
tests/libtest/lib2304.c
tests/libtest/lib2502.c
tests/libtest/lib2700.c
tests/libtest/lib3033.c
tests/libtest/lib500.c
tests/libtest/lib552.c
tests/libtest/lib573.c
tests/libtest/lib753.c
tests/libtest/testtrace.c
tests/libtest/testtrace.h