From 77dc5be6b41522d6d01b83d71b5619ac8a96eae6 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. (cherry picked from commit 59528d0e9d2ff5a9ed839e45272007bac73e64c4) --- 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 f2e4e7282b..a2b7f16b57 100644 --- a/lib/dns/tests/acl_test.c +++ b/lib/dns/tests/acl_test.c @@ -17,8 +17,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 0578387096..1052616385 100644 --- a/lib/dns/tests/db_test.c +++ b/lib/dns/tests/db_test.c @@ -17,8 +17,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 6b2bc1ab25..0ddb814e44 100644 --- a/lib/dns/tests/dbdiff_test.c +++ b/lib/dns/tests/dbdiff_test.c @@ -17,6 +17,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 81fa3ab5b2..6ee1a3c78a 100644 --- a/lib/dns/tests/dbiterator_test.c +++ b/lib/dns/tests/dbiterator_test.c @@ -17,6 +17,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 570a025806..ca10d09e63 100644 --- a/lib/dns/tests/dbversion_test.c +++ b/lib/dns/tests/dbversion_test.c @@ -17,6 +17,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 d83d9f59fe..22da8167b9 100644 --- a/lib/dns/tests/dh_test.c +++ b/lib/dns/tests/dh_test.c @@ -17,6 +17,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 8bf338fb46..21dc4f8757 100644 --- a/lib/dns/tests/dispatch_test.c +++ b/lib/dns/tests/dispatch_test.c @@ -18,6 +18,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 35e1016bbb..e36d53eaac 100644 --- a/lib/dns/tests/dnstap_test.c +++ b/lib/dns/tests/dnstap_test.c @@ -18,6 +18,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 7f7da0cf21..689016de7e 100644 --- a/lib/dns/tests/dnstest.c +++ b/lib/dns/tests/dnstest.c @@ -18,9 +18,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 819c8898d7..87f4f6f329 100644 --- a/lib/dns/tests/dst_test.c +++ b/lib/dns/tests/dst_test.c @@ -17,8 +17,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 727c649f90..605ebae27e 100644 --- a/lib/dns/tests/geoip_test.c +++ b/lib/dns/tests/geoip_test.c @@ -17,6 +17,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 d2fdb7f0c1..f158616680 100644 --- a/lib/dns/tests/keytable_test.c +++ b/lib/dns/tests/keytable_test.c @@ -17,10 +17,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 c407e3c23d..16b2f7441d 100644 --- a/lib/dns/tests/master_test.c +++ b/lib/dns/tests/master_test.c @@ -18,6 +18,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 b6256e9ab3..6dcb507098 100644 --- a/lib/dns/tests/name_test.c +++ b/lib/dns/tests/name_test.c @@ -18,6 +18,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 8a8ffff599..ab8c2296b1 100644 --- a/lib/dns/tests/nsec3_test.c +++ b/lib/dns/tests/nsec3_test.c @@ -17,6 +17,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 8155e2c692..520ba5be35 100644 --- a/lib/dns/tests/peer_test.c +++ b/lib/dns/tests/peer_test.c @@ -17,6 +17,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 ee3def2047..6bbeeb0cd9 100644 --- a/lib/dns/tests/private_test.c +++ b/lib/dns/tests/private_test.c @@ -19,6 +19,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 932cb5edb5..0867a6934e 100644 --- a/lib/dns/tests/rbt_serialize_test.c +++ b/lib/dns/tests/rbt_serialize_test.c @@ -18,11 +18,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 85a993367e..afc206ee32 100644 --- a/lib/dns/tests/rbt_test.c +++ b/lib/dns/tests/rbt_test.c @@ -20,6 +20,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 064f0cb614..af0d62f426 100644 --- a/lib/dns/tests/rdata_test.c +++ b/lib/dns/tests/rdata_test.c @@ -17,6 +17,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 36d4e2dc4e..88b8137611 100644 --- a/lib/dns/tests/rdataset_test.c +++ b/lib/dns/tests/rdataset_test.c @@ -17,6 +17,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 c0759e568c..88433ca26c 100644 --- a/lib/dns/tests/rdatasetstats_test.c +++ b/lib/dns/tests/rdatasetstats_test.c @@ -18,6 +18,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 e7149dc377..12236327be 100644 --- a/lib/dns/tests/resolver_test.c +++ b/lib/dns/tests/resolver_test.c @@ -17,6 +17,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 32b916d3e3..81f9852919 100644 --- a/lib/dns/tests/rsa_test.c +++ b/lib/dns/tests/rsa_test.c @@ -18,6 +18,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 66cd071ab1..1709db7d54 100644 --- a/lib/dns/tests/sigs_test.c +++ b/lib/dns/tests/sigs_test.c @@ -17,8 +17,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 e51239bc39..7ead2da004 100644 --- a/lib/dns/tests/time_test.c +++ b/lib/dns/tests/time_test.c @@ -18,9 +18,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 d5db4fe612..590acb6fb8 100644 --- a/lib/dns/tests/tkey_test.c +++ b/lib/dns/tests/tkey_test.c @@ -14,10 +14,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 c32557eb59..ddb420f48a 100644 --- a/lib/dns/tests/tsig_test.c +++ b/lib/dns/tests/tsig_test.c @@ -17,8 +17,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 94f9c97923..ed4bd3024e 100644 --- a/lib/dns/tests/update_test.c +++ b/lib/dns/tests/update_test.c @@ -18,11 +18,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 be856b2314..d97e2b2648 100644 --- a/lib/dns/tests/zonemgr_test.c +++ b/lib/dns/tests/zonemgr_test.c @@ -17,6 +17,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 b929e01bbc..09102aba58 100644 --- a/lib/dns/tests/zt_test.c +++ b/lib/dns/tests/zt_test.c @@ -17,6 +17,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 3afa82d267..a4d6715840 100644 --- a/lib/irs/tests/resconf_test.c +++ b/lib/irs/tests/resconf_test.c @@ -17,6 +17,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 8cbb747e25..e788a4e47c 100644 --- a/lib/isc/tests/buffer_test.c +++ b/lib/isc/tests/buffer_test.c @@ -19,6 +19,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 28c1fbb355..838f3e330e 100644 --- a/lib/isc/tests/counter_test.c +++ b/lib/isc/tests/counter_test.c @@ -17,6 +17,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 ff975a262e..7c2d1bf07f 100644 --- a/lib/isc/tests/heap_test.c +++ b/lib/isc/tests/heap_test.c @@ -19,8 +19,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 8cac0cfab7..bffe817cdb 100644 --- a/lib/isc/tests/hmac_test.c +++ b/lib/isc/tests/hmac_test.c @@ -18,8 +18,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 07f338a0a4..e1abbdf84a 100644 --- a/lib/isc/tests/ht_test.c +++ b/lib/isc/tests/ht_test.c @@ -18,6 +18,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 ca3f97f9a5..8ea0c07643 100644 --- a/lib/isc/tests/lex_test.c +++ b/lib/isc/tests/lex_test.c @@ -17,6 +17,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 85d4834662..11876bee7e 100644 --- a/lib/isc/tests/mem_test.c +++ b/lib/isc/tests/mem_test.c @@ -17,9 +17,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 b0f232d48a..347602e42c 100644 --- a/lib/isc/tests/parse_test.c +++ b/lib/isc/tests/parse_test.c @@ -19,11 +19,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 2e6c75044f..9d1eb8e03b 100644 --- a/lib/isc/tests/pool_test.c +++ b/lib/isc/tests/pool_test.c @@ -17,6 +17,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 de10a54262..ddd72ffbb7 100644 --- a/lib/isc/tests/queue_test.c +++ b/lib/isc/tests/queue_test.c @@ -17,10 +17,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 b17391ef79..8d806cf3f0 100644 --- a/lib/isc/tests/radix_test.c +++ b/lib/isc/tests/radix_test.c @@ -17,6 +17,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 f60422fb57..5d74503bbc 100644 --- a/lib/isc/tests/random_test.c +++ b/lib/isc/tests/random_test.c @@ -26,6 +26,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 af1d377c70..dd8984ba3f 100644 --- a/lib/isc/tests/safe_test.c +++ b/lib/isc/tests/safe_test.c @@ -19,8 +19,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 c1b2beb424..23df3cfb03 100644 --- a/lib/isc/tests/sockaddr_test.c +++ b/lib/isc/tests/sockaddr_test.c @@ -17,6 +17,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 0df1358983..fc20f1b5af 100644 --- a/lib/isc/tests/socket_test.c +++ b/lib/isc/tests/socket_test.c @@ -18,10 +18,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 3503952251..9b26d6a82b 100644 --- a/lib/isc/tests/symtab_test.c +++ b/lib/isc/tests/symtab_test.c @@ -17,6 +17,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 18c1717b9a..f8bbd5a4e2 100644 --- a/lib/isc/tests/task_test.c +++ b/lib/isc/tests/task_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/taskpool_test.c b/lib/isc/tests/taskpool_test.c index 3ea3728280..a01ba342cf 100644 --- a/lib/isc/tests/taskpool_test.c +++ b/lib/isc/tests/taskpool_test.c @@ -17,6 +17,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 50afbc441e..101bb57fbc 100644 --- a/lib/isc/tests/time_test.c +++ b/lib/isc/tests/time_test.c @@ -17,6 +17,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 1415a3fae2..079345ef42 100644 --- a/lib/isc/tests/timer_test.c +++ b/lib/isc/tests/timer_test.c @@ -17,6 +17,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 51c2a36664..7b057af6f7 100644 --- a/lib/isccfg/tests/parser_test.c +++ b/lib/isccfg/tests/parser_test.c @@ -17,6 +17,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 24b5b970f0..9984cbd086 100644 --- a/lib/ns/tests/listenlist_test.c +++ b/lib/ns/tests/listenlist_test.c @@ -15,9 +15,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 b6884ea7df..d2462816ed 100644 --- a/lib/ns/tests/notify_test.c +++ b/lib/ns/tests/notify_test.c @@ -15,9 +15,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 e4d070ed42..6eb40fda16 100644 --- a/lib/ns/tests/plugin_test.c +++ b/lib/ns/tests/plugin_test.c @@ -15,9 +15,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 e88a4bd4f1..c23dadc6c6 100644 --- a/lib/ns/tests/query_test.c +++ b/lib/ns/tests/query_test.c @@ -20,6 +20,7 @@ #include #include +#include /* IWYU pragma: keep */ #include #include #include