Fix building netmgr_test with DoH disable

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
This commit is contained in:
Artem Boldariev 2024-04-25 17:27:22 +03:00
parent d1d1d189e0
commit 139caf1354

View 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