curl/tests/server
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
..
.checksrc checksrc: use 'banfunc' proper in more places 2025-01-13 09:10:58 +01:00
.gitignore tests: always make bundles, adapt build and tests 2025-06-14 21:08:23 +02:00
CMakeLists.txt cmake: replace the way clang-tidy verifies tests, fix issues found 2025-06-22 23:08:46 +02:00
dnsd.c tests: make individual test sources compile cleanly 2025-06-22 15:58:15 +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
getpart.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: make individual test sources compile cleanly 2025-06-22 15:58:15 +02:00
mqttd.c cmake: replace the way clang-tidy verifies tests, fix issues found 2025-06-22 23:08:46 +02:00
resolve.c tests: make individual test sources compile cleanly 2025-06-22 15:58:15 +02:00
rtspd.c tests: make individual test sources compile cleanly 2025-06-22 15:58:15 +02:00
sockfilt.c cmake: replace the way clang-tidy verifies tests, fix issues found 2025-06-22 23:08:46 +02:00
socksd.c tests: make individual test sources compile cleanly 2025-06-22 15:58:15 +02:00
sws.c tests: make individual test sources compile cleanly 2025-06-22 15:58:15 +02:00
tftpd.c tests: make individual test sources compile cleanly 2025-06-22 15:58:15 +02:00
util.c tests: make individual test sources compile cleanly 2025-06-22 15:58:15 +02:00