From 59528d0e9d2ff5a9ed839e45272007bac73e64c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Tue, 30 Jul 2019 21:08:40 +0200 Subject: [PATCH] Include where necessary for musl libc All unit tests define the UNIT_TESTING macro, which causes to replace malloc(), calloc(), realloc(), and free() with its own functions tracking memory allocations. In order for this not to break compilation, the system header declaring the prototypes for these standard functions must be included before . Normally, these prototypes are only present in , so we make sure it is included before . However, musl libc also defines the prototypes for calloc() and free() in , which is included by , which is included e.g. by . Thus, unit tests including "dnstest.h" (which includes , which includes ) after will not compile with musl libc as for these programs, will be included after . Always including after all other header files is not a feasible solution as that causes the mock assertion macros defined in to mangle the contents of , thus breaking compilation. We cannot really use the __noreturn__ or analyzer_noreturn attributes with cmocka assertion functions because they do return if the tested condition is true. The problem is that what BIND unit tests do is incompatible with Clang Static Analyzer's assumptions: since we use cmocka, our custom assertion handlers are present in a shared library (i.e. it is the cmocka library that checks the assertion condition, not a macro in unit test code). Redefining cmocka's assertion macros in is an ugly hack to overcome that problem - unfortunately, this is the only way we can think of to make Clang Static Analyzer properly process unit test code. Giving up on Clang Static Analyzer being able to properly process unit test code is not a satisfactory solution. Undefining _GNU_SOURCE for unit test code could work around the problem (musl libc's only defines the prototypes for calloc() and free() when _GNU_SOURCE is defined), but doing that could introduce discrepancies for unit tests including entire *.c files, so it is also not a good solution. All in all, including before for all affected unit tests seems to be the most benign way of working around this musl libc quirk. While quite an ugly solution, it achieves our goals here, which are to keep the benefit of proper static analysis of unit test code and to fix compilation against musl libc. --- lib/dns/tests/acl_test.c | 3 ++- lib/dns/tests/db_test.c | 3 ++- lib/dns/tests/dbdiff_test.c | 1 + lib/dns/tests/dbiterator_test.c | 1 + lib/dns/tests/dbversion_test.c | 1 + lib/dns/tests/dh_test.c | 1 + lib/dns/tests/dispatch_test.c | 1 + lib/dns/tests/dnstap_test.c | 1 + lib/dns/tests/dnstest.c | 3 ++- lib/dns/tests/dst_test.c | 3 ++- lib/dns/tests/geoip_test.c | 1 + lib/dns/tests/keytable_test.c | 5 +++-- lib/dns/tests/master_test.c | 1 + lib/dns/tests/name_test.c | 1 + lib/dns/tests/nsec3_test.c | 1 + lib/dns/tests/peer_test.c | 1 + lib/dns/tests/private_test.c | 1 + lib/dns/tests/rbt_serialize_test.c | 7 ++++--- lib/dns/tests/rbt_test.c | 1 + lib/dns/tests/rdata_test.c | 1 + lib/dns/tests/rdataset_test.c | 1 + lib/dns/tests/rdatasetstats_test.c | 1 + lib/dns/tests/resolver_test.c | 1 + lib/dns/tests/rsa_test.c | 1 + lib/dns/tests/sigs_test.c | 3 ++- lib/dns/tests/time_test.c | 5 +++-- lib/dns/tests/tkey_test.c | 7 +++++-- lib/dns/tests/tsig_test.c | 3 ++- lib/dns/tests/update_test.c | 7 ++++--- lib/dns/tests/zonemgr_test.c | 1 + lib/dns/tests/zt_test.c | 1 + lib/irs/tests/resconf_test.c | 1 + lib/isc/tests/buffer_test.c | 1 + lib/isc/tests/counter_test.c | 1 + lib/isc/tests/heap_test.c | 3 ++- lib/isc/tests/hmac_test.c | 3 ++- lib/isc/tests/ht_test.c | 1 + lib/isc/tests/lex_test.c | 1 + lib/isc/tests/mem_test.c | 3 ++- lib/isc/tests/parse_test.c | 5 +++-- lib/isc/tests/pool_test.c | 1 + lib/isc/tests/queue_test.c | 3 ++- lib/isc/tests/radix_test.c | 1 + lib/isc/tests/random_test.c | 1 + lib/isc/tests/safe_test.c | 3 ++- lib/isc/tests/sockaddr_test.c | 1 + lib/isc/tests/socket_test.c | 3 ++- lib/isc/tests/symtab_test.c | 1 + lib/isc/tests/task_test.c | 5 +++-- lib/isc/tests/taskpool_test.c | 1 + lib/isc/tests/time_test.c | 1 + lib/isc/tests/timer_test.c | 1 + lib/isccfg/tests/parser_test.c | 1 + lib/ns/tests/listenlist_test.c | 4 +++- lib/ns/tests/notify_test.c | 4 +++- lib/ns/tests/plugin_test.c | 4 +++- lib/ns/tests/query_test.c | 1 + 57 files changed, 93 insertions(+), 31 deletions(-) diff --git a/lib/dns/tests/acl_test.c b/lib/dns/tests/acl_test.c index 056e6469d2..5e7c34dbea 100644 --- a/lib/dns/tests/acl_test.c +++ b/lib/dns/tests/acl_test.c @@ -15,8 +15,9 @@ #include #include -#include +#include /* IWYU pragma: keep */ #include +#include #include #include diff --git a/lib/dns/tests/db_test.c b/lib/dns/tests/db_test.c index 07f0cd160a..6738a53a1f 100644 --- a/lib/dns/tests/db_test.c +++ b/lib/dns/tests/db_test.c @@ -15,8 +15,9 @@ #include #include -#include +#include /* IWYU pragma: keep */ #include +#include #define UNIT_TESTING #include diff --git a/lib/dns/tests/dbdiff_test.c b/lib/dns/tests/dbdiff_test.c index d310e784d0..1306bf8ac0 100644 --- a/lib/dns/tests/dbdiff_test.c +++ b/lib/dns/tests/dbdiff_test.c @@ -15,6 +15,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include #include diff --git a/lib/dns/tests/dbiterator_test.c b/lib/dns/tests/dbiterator_test.c index 374f248f0a..e825b7b4d2 100644 --- a/lib/dns/tests/dbiterator_test.c +++ b/lib/dns/tests/dbiterator_test.c @@ -15,6 +15,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include #include diff --git a/lib/dns/tests/dbversion_test.c b/lib/dns/tests/dbversion_test.c index 5cb0f0446c..79272735ca 100644 --- a/lib/dns/tests/dbversion_test.c +++ b/lib/dns/tests/dbversion_test.c @@ -15,6 +15,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include #include diff --git a/lib/dns/tests/dh_test.c b/lib/dns/tests/dh_test.c index 8c2267dc22..6893aee1a6 100644 --- a/lib/dns/tests/dh_test.c +++ b/lib/dns/tests/dh_test.c @@ -15,6 +15,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include #include diff --git a/lib/dns/tests/dispatch_test.c b/lib/dns/tests/dispatch_test.c index bfc0bd343f..9785fbfbae 100644 --- a/lib/dns/tests/dispatch_test.c +++ b/lib/dns/tests/dispatch_test.c @@ -16,6 +16,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include #include diff --git a/lib/dns/tests/dnstap_test.c b/lib/dns/tests/dnstap_test.c index f28e149a8b..da71a6c546 100644 --- a/lib/dns/tests/dnstap_test.c +++ b/lib/dns/tests/dnstap_test.c @@ -16,6 +16,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include #include diff --git a/lib/dns/tests/dnstest.c b/lib/dns/tests/dnstest.c index cf4d35f7a3..ce83df60a2 100644 --- a/lib/dns/tests/dnstest.c +++ b/lib/dns/tests/dnstest.c @@ -16,9 +16,10 @@ #include #include +#include /* IWYU pragma: keep */ #include -#include #include +#include #include #include diff --git a/lib/dns/tests/dst_test.c b/lib/dns/tests/dst_test.c index 9809f5db77..0abe214520 100644 --- a/lib/dns/tests/dst_test.c +++ b/lib/dns/tests/dst_test.c @@ -15,8 +15,9 @@ #include #include -#include +#include /* IWYU pragma: keep */ #include +#include #include #define UNIT_TESTING diff --git a/lib/dns/tests/geoip_test.c b/lib/dns/tests/geoip_test.c index a09f66e552..7481881a1e 100644 --- a/lib/dns/tests/geoip_test.c +++ b/lib/dns/tests/geoip_test.c @@ -15,6 +15,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include #include diff --git a/lib/dns/tests/keytable_test.c b/lib/dns/tests/keytable_test.c index 1a92c2f2a2..c6f777f03a 100644 --- a/lib/dns/tests/keytable_test.c +++ b/lib/dns/tests/keytable_test.c @@ -15,10 +15,11 @@ #include #include -#include +#include +#include /* IWYU pragma: keep */ #include #include -#include +#include #include #define UNIT_TESTING diff --git a/lib/dns/tests/master_test.c b/lib/dns/tests/master_test.c index 73a0e64be2..cbf55f4942 100644 --- a/lib/dns/tests/master_test.c +++ b/lib/dns/tests/master_test.c @@ -15,6 +15,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include #include diff --git a/lib/dns/tests/name_test.c b/lib/dns/tests/name_test.c index 239c25d075..b3dcf81176 100644 --- a/lib/dns/tests/name_test.c +++ b/lib/dns/tests/name_test.c @@ -16,6 +16,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include #include diff --git a/lib/dns/tests/nsec3_test.c b/lib/dns/tests/nsec3_test.c index 7df028ddc1..8b43aadb0e 100644 --- a/lib/dns/tests/nsec3_test.c +++ b/lib/dns/tests/nsec3_test.c @@ -15,6 +15,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include #include diff --git a/lib/dns/tests/peer_test.c b/lib/dns/tests/peer_test.c index 5ba37c831b..3ad5bc8274 100644 --- a/lib/dns/tests/peer_test.c +++ b/lib/dns/tests/peer_test.c @@ -15,6 +15,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include #include diff --git a/lib/dns/tests/private_test.c b/lib/dns/tests/private_test.c index e8e642d1ba..7ea6ba61f7 100644 --- a/lib/dns/tests/private_test.c +++ b/lib/dns/tests/private_test.c @@ -16,6 +16,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include #include diff --git a/lib/dns/tests/rbt_serialize_test.c b/lib/dns/tests/rbt_serialize_test.c index 26894c9d7b..b4cd765e39 100644 --- a/lib/dns/tests/rbt_serialize_test.c +++ b/lib/dns/tests/rbt_serialize_test.c @@ -15,11 +15,12 @@ #include #include -#include -#include #include -#include +#include +#include /* IWYU pragma: keep */ +#include #include +#include #define UNIT_TESTING #include diff --git a/lib/dns/tests/rbt_test.c b/lib/dns/tests/rbt_test.c index 158bf1dede..478ef68673 100644 --- a/lib/dns/tests/rbt_test.c +++ b/lib/dns/tests/rbt_test.c @@ -18,6 +18,7 @@ #include #include #include +#include /* IWYU pragma: keep */ #include #include #include diff --git a/lib/dns/tests/rdata_test.c b/lib/dns/tests/rdata_test.c index 0bf9779b7e..dc95ba6e26 100644 --- a/lib/dns/tests/rdata_test.c +++ b/lib/dns/tests/rdata_test.c @@ -15,6 +15,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include #include diff --git a/lib/dns/tests/rdataset_test.c b/lib/dns/tests/rdataset_test.c index ec9bd929e7..bf9eee8c55 100644 --- a/lib/dns/tests/rdataset_test.c +++ b/lib/dns/tests/rdataset_test.c @@ -15,6 +15,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include #include diff --git a/lib/dns/tests/rdatasetstats_test.c b/lib/dns/tests/rdatasetstats_test.c index 39c6f87a4d..53e518229b 100644 --- a/lib/dns/tests/rdatasetstats_test.c +++ b/lib/dns/tests/rdatasetstats_test.c @@ -16,6 +16,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include #include diff --git a/lib/dns/tests/resolver_test.c b/lib/dns/tests/resolver_test.c index df26b6c0dd..3d34e9fd4f 100644 --- a/lib/dns/tests/resolver_test.c +++ b/lib/dns/tests/resolver_test.c @@ -15,6 +15,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include diff --git a/lib/dns/tests/rsa_test.c b/lib/dns/tests/rsa_test.c index 3b0433ec3d..d0dcb8992d 100644 --- a/lib/dns/tests/rsa_test.c +++ b/lib/dns/tests/rsa_test.c @@ -15,6 +15,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include #include diff --git a/lib/dns/tests/sigs_test.c b/lib/dns/tests/sigs_test.c index 065f5a98b3..45e68def58 100644 --- a/lib/dns/tests/sigs_test.c +++ b/lib/dns/tests/sigs_test.c @@ -15,8 +15,9 @@ #include #include -#include +#include /* IWYU pragma: keep */ #include +#include #include #define UNIT_TESTING diff --git a/lib/dns/tests/time_test.c b/lib/dns/tests/time_test.c index f4b152562c..c1c0362021 100644 --- a/lib/dns/tests/time_test.c +++ b/lib/dns/tests/time_test.c @@ -15,9 +15,10 @@ #include #include -#include -#include #include +#include /* IWYU pragma: keep */ +#include +#include #include #define UNIT_TESTING diff --git a/lib/dns/tests/tkey_test.c b/lib/dns/tests/tkey_test.c index 8727f1eddd..f78cb2e6ae 100644 --- a/lib/dns/tests/tkey_test.c +++ b/lib/dns/tests/tkey_test.c @@ -12,10 +12,13 @@ #if HAVE_CMOCKA #include -#include #include -#include #include + +#include /* IWYU pragma: keep */ +#include +#include + #include #include diff --git a/lib/dns/tests/tsig_test.c b/lib/dns/tests/tsig_test.c index 0092a9be51..c489fcfeff 100644 --- a/lib/dns/tests/tsig_test.c +++ b/lib/dns/tests/tsig_test.c @@ -15,8 +15,9 @@ #include #include -#include +#include /* IWYU pragma: keep */ #include +#include #include #define UNIT_TESTING diff --git a/lib/dns/tests/update_test.c b/lib/dns/tests/update_test.c index 168d1be99e..9798ccf192 100644 --- a/lib/dns/tests/update_test.c +++ b/lib/dns/tests/update_test.c @@ -15,11 +15,12 @@ #include #include -#include -#include #include -#include +#include /* IWYU pragma: keep */ +#include +#include #include +#include #define UNIT_TESTING #include diff --git a/lib/dns/tests/zonemgr_test.c b/lib/dns/tests/zonemgr_test.c index 59471f1e8f..2ab5c66ab3 100644 --- a/lib/dns/tests/zonemgr_test.c +++ b/lib/dns/tests/zonemgr_test.c @@ -15,6 +15,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include #include diff --git a/lib/dns/tests/zt_test.c b/lib/dns/tests/zt_test.c index d558c2957f..ede2977341 100644 --- a/lib/dns/tests/zt_test.c +++ b/lib/dns/tests/zt_test.c @@ -15,6 +15,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include #include diff --git a/lib/irs/tests/resconf_test.c b/lib/irs/tests/resconf_test.c index 2d4b6e80ef..81b601d52a 100644 --- a/lib/irs/tests/resconf_test.c +++ b/lib/irs/tests/resconf_test.c @@ -15,6 +15,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include #include diff --git a/lib/isc/tests/buffer_test.c b/lib/isc/tests/buffer_test.c index 83aba23a16..80d01e04e4 100644 --- a/lib/isc/tests/buffer_test.c +++ b/lib/isc/tests/buffer_test.c @@ -17,6 +17,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include #include diff --git a/lib/isc/tests/counter_test.c b/lib/isc/tests/counter_test.c index 424ddf2821..6770dd2453 100644 --- a/lib/isc/tests/counter_test.c +++ b/lib/isc/tests/counter_test.c @@ -15,6 +15,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include diff --git a/lib/isc/tests/heap_test.c b/lib/isc/tests/heap_test.c index b29b441caa..9cc043152a 100644 --- a/lib/isc/tests/heap_test.c +++ b/lib/isc/tests/heap_test.c @@ -17,8 +17,9 @@ #include #include -#include +#include /* IWYU pragma: keep */ #include +#include #define UNIT_TESTING #include diff --git a/lib/isc/tests/hmac_test.c b/lib/isc/tests/hmac_test.c index b86e8d5b54..9e49baffcb 100644 --- a/lib/isc/tests/hmac_test.c +++ b/lib/isc/tests/hmac_test.c @@ -16,8 +16,9 @@ #include #include #include -#include +#include /* IWYU pragma: keep */ +#include #include #define UNIT_TESTING diff --git a/lib/isc/tests/ht_test.c b/lib/isc/tests/ht_test.c index b712187ad0..ff7446cce1 100644 --- a/lib/isc/tests/ht_test.c +++ b/lib/isc/tests/ht_test.c @@ -16,6 +16,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include #include diff --git a/lib/isc/tests/lex_test.c b/lib/isc/tests/lex_test.c index 42b53020bf..ab44d15162 100644 --- a/lib/isc/tests/lex_test.c +++ b/lib/isc/tests/lex_test.c @@ -15,6 +15,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include #include diff --git a/lib/isc/tests/mem_test.c b/lib/isc/tests/mem_test.c index eea3eed7cd..293ba3fcd3 100644 --- a/lib/isc/tests/mem_test.c +++ b/lib/isc/tests/mem_test.c @@ -15,9 +15,10 @@ #include #include +#include +#include /* IWYU pragma: keep */ #include #include -#include #define UNIT_TESTING #include diff --git a/lib/isc/tests/parse_test.c b/lib/isc/tests/parse_test.c index 2db2684dbd..60dfa188e4 100644 --- a/lib/isc/tests/parse_test.c +++ b/lib/isc/tests/parse_test.c @@ -17,11 +17,12 @@ #include #include +#include +#include /* IWYU pragma: keep */ #include #include -#include -#include #include +#include #define UNIT_TESTING #include diff --git a/lib/isc/tests/pool_test.c b/lib/isc/tests/pool_test.c index 20a0aaeed7..b902869b86 100644 --- a/lib/isc/tests/pool_test.c +++ b/lib/isc/tests/pool_test.c @@ -15,6 +15,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include #include diff --git a/lib/isc/tests/queue_test.c b/lib/isc/tests/queue_test.c index f360ec9df4..c60e1e27b9 100644 --- a/lib/isc/tests/queue_test.c +++ b/lib/isc/tests/queue_test.c @@ -15,10 +15,11 @@ #include #include +#include /* IWYU pragma: keep */ #include #include -#include #include +#include #define UNIT_TESTING #include diff --git a/lib/isc/tests/radix_test.c b/lib/isc/tests/radix_test.c index 5af46a5851..5f49ac08fd 100644 --- a/lib/isc/tests/radix_test.c +++ b/lib/isc/tests/radix_test.c @@ -15,6 +15,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include diff --git a/lib/isc/tests/random_test.c b/lib/isc/tests/random_test.c index 18fcb3eb60..56f37ce025 100644 --- a/lib/isc/tests/random_test.c +++ b/lib/isc/tests/random_test.c @@ -24,6 +24,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include diff --git a/lib/isc/tests/safe_test.c b/lib/isc/tests/safe_test.c index 086c771508..92cfc8262e 100644 --- a/lib/isc/tests/safe_test.c +++ b/lib/isc/tests/safe_test.c @@ -17,8 +17,9 @@ #include #include -#include +#include /* IWYU pragma: keep */ #include +#include #define UNIT_TESTING #include diff --git a/lib/isc/tests/sockaddr_test.c b/lib/isc/tests/sockaddr_test.c index 056ebd925a..64e3490ca4 100644 --- a/lib/isc/tests/sockaddr_test.c +++ b/lib/isc/tests/sockaddr_test.c @@ -15,6 +15,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include #include diff --git a/lib/isc/tests/socket_test.c b/lib/isc/tests/socket_test.c index 35b33ea698..20cf26b22d 100644 --- a/lib/isc/tests/socket_test.c +++ b/lib/isc/tests/socket_test.c @@ -16,10 +16,11 @@ #include #include +#include /* IWYU pragma: keep */ #include #include -#include #include +#include #define UNIT_TESTING #include diff --git a/lib/isc/tests/symtab_test.c b/lib/isc/tests/symtab_test.c index ef08a08010..fea0cda699 100644 --- a/lib/isc/tests/symtab_test.c +++ b/lib/isc/tests/symtab_test.c @@ -15,6 +15,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include #include diff --git a/lib/isc/tests/task_test.c b/lib/isc/tests/task_test.c index 1043b4d1d4..9a0b902e22 100644 --- a/lib/isc/tests/task_test.c +++ b/lib/isc/tests/task_test.c @@ -15,11 +15,12 @@ #include #include +#include +#include /* IWYU pragma: keep */ #include #include -#include -#include #include +#include #define UNIT_TESTING #include diff --git a/lib/isc/tests/taskpool_test.c b/lib/isc/tests/taskpool_test.c index 1355a9268e..a7453d96e8 100644 --- a/lib/isc/tests/taskpool_test.c +++ b/lib/isc/tests/taskpool_test.c @@ -15,6 +15,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include #include diff --git a/lib/isc/tests/time_test.c b/lib/isc/tests/time_test.c index 61a1792ba4..122997c8b8 100644 --- a/lib/isc/tests/time_test.c +++ b/lib/isc/tests/time_test.c @@ -15,6 +15,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include #include diff --git a/lib/isc/tests/timer_test.c b/lib/isc/tests/timer_test.c index 31e0cf55f3..d2fa9fcbea 100644 --- a/lib/isc/tests/timer_test.c +++ b/lib/isc/tests/timer_test.c @@ -15,6 +15,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include #include diff --git a/lib/isccfg/tests/parser_test.c b/lib/isccfg/tests/parser_test.c index 75bb474589..d684c6b268 100644 --- a/lib/isccfg/tests/parser_test.c +++ b/lib/isccfg/tests/parser_test.c @@ -15,6 +15,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include #include diff --git a/lib/ns/tests/listenlist_test.c b/lib/ns/tests/listenlist_test.c index a0aecd7707..5d4fd8763e 100644 --- a/lib/ns/tests/listenlist_test.c +++ b/lib/ns/tests/listenlist_test.c @@ -13,9 +13,11 @@ #include #include -#include #include +#include /* IWYU pragma: keep */ +#include + #include #include diff --git a/lib/ns/tests/notify_test.c b/lib/ns/tests/notify_test.c index de5433680e..1094c26391 100644 --- a/lib/ns/tests/notify_test.c +++ b/lib/ns/tests/notify_test.c @@ -13,9 +13,11 @@ #include #include -#include #include +#include /* IWYU pragma: keep */ +#include + #include #include diff --git a/lib/ns/tests/plugin_test.c b/lib/ns/tests/plugin_test.c index 8a7e207ca4..de910a9bd9 100644 --- a/lib/ns/tests/plugin_test.c +++ b/lib/ns/tests/plugin_test.c @@ -13,9 +13,11 @@ #include #include -#include #include +#include /* IWYU pragma: keep */ +#include + #define UNIT_TESTING #include diff --git a/lib/ns/tests/query_test.c b/lib/ns/tests/query_test.c index 770c9f485e..bcbeecc167 100644 --- a/lib/ns/tests/query_test.c +++ b/lib/ns/tests/query_test.c @@ -18,6 +18,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include #include