2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 13:38:26 +00:00

4 Commits

Author SHA1 Message Date
Mark Andrews
a6dba44b65 Use clang-format-20 to update formatting
(cherry picked from commit 422b9118e878d3106c84b2eac44371f7143f320b)
2025-06-25 13:59:44 +10:00
Ondřej Surý
c5bac96fd0
Remove redundant parentheses from the return statement
(cherry picked from commit 0258850f202b7a46b52f3e3a4968c3fc68fe9a45)
2024-11-19 16:06:16 +01:00
Michał Kępień
78afc0bf04
Include <inttypes.h> whenever including <cmocka.h>
Development versions of cmocka require the intmax_t and uintmax_t types
to be defined by the time the test code includes the <cmocka.h> header.
These types are defined in the <stdint.h> header, which is included by
the <inttypes.h> header, which in turn is already explicitly included by
some of the programs in the tests/ directory.  Ensure all programs in
that directory that include the <cmocka.h> header also include the
<inttypes.h> header to future-proof the code while keeping the change
set minimal and the resulting code consistent.  Also prevent explicitly
including the <stdint.h> header in those programs as it is included by
the <inttypes.h> header.

(cherry picked from commit c2dcd055fe03f3ec5c76bc1c778b97aa4941e17b)
2023-05-18 15:36:03 +02:00
Ondřej Surý
f128a9bcf2 Move all the unit tests to /tests/<libname>/
The unit tests are now using a common base, which means that
lib/dns/tests/ code now has to include lib/isc/include/isc/test.h and
link with lib/isc/test.c and lib/ns/tests has to include both libisc and
libdns parts.

Instead of cross-linking code between the directories, move the
/lib/<foo>/test.c to /tests/<foo>.c and /lib/<foo>/include/<foo>test.h
to /tests/include/tests/<foo>.h and create a single libtest.la
convenience library in /tests/.

At the same time, move the /lib/<foo>/tests/ to /tests/<foo>/ (but keep
it symlinked to the old location) and adjust paths accordingly.  In few
places, we are now using absolute paths instead of relative paths,
because the directory level has changed.  By moving the directories
under the /tests/ directory, the test-related code is kept in a single
place and we can avoid referencing files between libns->libdns->libisc
which is unhealthy because they live in a separate Makefile-space.

In the future, the /bin/tests/ should be merged to /tests/ and symlink
kept, and the /fuzz/ directory moved to /tests/fuzz/.

(cherry picked from commit 2c3b2dabe9a6b3c4a10f6498a1169f39ed031eed)
2022-05-31 12:06:00 +02:00