]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix building netmgr_test with DoH disable
authorArtem Boldariev <artem@boldariev.com>
Thu, 25 Apr 2024 14:27:22 +0000 (17:27 +0300)
committerArtem Boldariev <artem@boldariev.com>
Mon, 29 Apr 2024 13:59:26 +0000 (16:59 +0300)
Some parts of the test rely on the functionality available only when
DoH is enabled, but they were not properly surrounded by #ifdef's.
This commit fixes that

tests/isc/netmgr_test.c

index 49e5e01722e7147960f5cfd7a91bfa389fbc9e12..ffe488fd90ba4937aaf954b6e0b930bcecca473c 100644 (file)
@@ -2401,6 +2401,7 @@ ISC_RUN_TEST_IMPL(tlsdns_recv_one) {
        atomic_assert_int_eq(ssends, 0);
 }
 
+#ifdef HAVE_LIBNGHTTP2
 static void
 tlsdns_many_listen_read_cb(isc_nmhandle_t *handle, isc_result_t eresult,
                           isc_region_t *region, void *cbarg) {
@@ -2570,6 +2571,7 @@ ISC_RUN_TEST_IMPL(tlsdns_server_send_many_recv_one) {
        atomic_assert_int_eq(sreads, 1);
        atomic_assert_int_eq(ssends, 1);
 }
+#endif /* HAVE_LIBNGHTTP2 */
 
 ISC_RUN_TEST_IMPL(tlsdns_recv_two) {
        isc_result_t result = ISC_R_SUCCESS;
@@ -3049,8 +3051,6 @@ ISC_TEST_ENTRY_CUSTOM(tls_half_recv_half_send_quota_sendback, setup_test,
 
 /* TLSDNS */
 ISC_TEST_ENTRY_CUSTOM(tlsdns_recv_one, setup_test, teardown_test)
-ISC_TEST_ENTRY_CUSTOM(tlsdns_server_send_many_recv_one, setup_test,
-                     teardown_test)
 ISC_TEST_ENTRY_CUSTOM(tlsdns_recv_two, setup_test, teardown_test)
 ISC_TEST_ENTRY_CUSTOM(tlsdns_noop, setup_test, teardown_test)
 ISC_TEST_ENTRY_CUSTOM(tlsdns_noresponse, setup_test, teardown_test)
@@ -3062,6 +3062,8 @@ ISC_TEST_ENTRY_CUSTOM(tlsdns_half_recv_half_send, setup_test, teardown_test)
 ISC_TEST_ENTRY_CUSTOM(tlsdns_connect_noalpn, setup_test, teardown_test)
 #ifdef HAVE_LIBNGHTTP2
 ISC_TEST_ENTRY_CUSTOM(tlsdns_listen_noalpn, setup_test, teardown_test)
+ISC_TEST_ENTRY_CUSTOM(tlsdns_server_send_many_recv_one, setup_test,
+                     teardown_test)
 #endif
 
 ISC_TEST_LIST_END