curl/tests/client
Viktor Szakats e088e10454
cmake: replace the way clang-tidy verifies tests, fix issues found
Replace existing `mk-unity.pl` `--embed` workaround with running
`clang-tidy` manually on individual test source instead. This aligns
with how clang-tidy works and removes `mk-unity.pl` from the solution.

Also:
- mqttd: fix potentially uninitialized buffer by zero filling it.
  ```
  tests/server/mqttd.c:484:41: error: The left operand of '<<' is a garbage value
    [clang-analyzer-core.UndefinedBinaryOperatorResult,-warnings-as-errors]
    484 |       payload_len = (size_t)(buffer[10] << 8) | buffer[11];
        |                                         ^
  [...]
  tests/server/mqttd.c:606:45: error: The left operand of '<<' is a garbage value
    [clang-analyzer-core.UndefinedBinaryOperatorResult,-warnings-as-errors]
    606 |       topiclen = (size_t)(buffer[1 + bytes] << 8) | buffer[2 + bytes];
        |                                             ^
  ```
- sockfilt: fix potential out-of-bound pointer:
  ```
  tests/server/sockfilt.c:1128:33: error: The 2nd argument to 'send' is a buffer
     with size 17010 but should be a buffer with size equal to or greater than
     the value of the 3rd argument (which is 18446744073709551615)
     [clang-analyzer-unix.StdCLibraryFunctions,-warnings-as-errors]
   1128 |         ssize_t bytes_written = swrite(sockfd, buffer, buffer_len);
        |                                 ^
  ```
- clang-tidy: suppress bogus `bzero()` warnings that happens
  inside the notorious `FD_ZERO()` macros, on macOS.

Ref: https://github.com/curl/curl/pull/17680#issuecomment-2991730158

Closes #17705
2025-06-22 23:08:46 +02:00
..
.gitignore tests/http/clients: move to tests/client 2025-06-17 19:39:36 +02:00
CMakeLists.txt cmake: replace the way clang-tidy verifies tests, fix issues found 2025-06-22 23:08:46 +02:00
first.c tests: make individual test sources compile cleanly 2025-06-22 15:58:15 +02:00
first.h tests: make individual test sources compile cleanly 2025-06-22 15:58:15 +02:00
h2_pausing.c tests: make individual test sources compile cleanly 2025-06-22 15:58:15 +02:00
h2_serverpush.c h2_serverpush: fix file handle leaks reported by clang-tidy 2025-06-22 21:42:53 +02:00
h2_upgrade_extreme.c tests: make individual test sources compile cleanly 2025-06-22 15:58:15 +02:00
hx_download.c tests: make individual test sources compile cleanly 2025-06-22 15:58:15 +02:00
hx_upload.c tests: make individual test sources compile cleanly 2025-06-22 15:58:15 +02:00
Makefile.am tests: drop BUNDLE_SRC variable 2025-06-21 10:49:05 +02:00
Makefile.inc tests: drop BUNDLE_SRC variable 2025-06-21 10:49:05 +02:00
tls_session_reuse.c tests: make individual test sources compile cleanly 2025-06-22 15:58:15 +02:00
upload_pausing.c tests: make individual test sources compile cleanly 2025-06-22 15:58:15 +02:00
ws_data.c tests: make individual test sources compile cleanly 2025-06-22 15:58:15 +02:00
ws_pingpong.c tests: make individual test sources compile cleanly 2025-06-22 15:58:15 +02:00