]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
DoH unit test: remove broken remnants of slowdown logic
authorArtem Boldariev <artem@boldariev.com>
Wed, 12 Oct 2022 12:26:06 +0000 (15:26 +0300)
committerArtem Boldariev <artem@boldariev.com>
Wed, 12 Oct 2022 13:24:04 +0000 (16:24 +0300)
This commit removes broken remnants of unit test slowdown logic, which
caused unit test hangs on platforms susceptible to "too many open
files" error, notably OpenBSD.

tests/isc/doh_test.c

index a36893557e0e9270bdd57a979c3d45db529e0bdd..fca204c307e5caf22a906b36a33f64ca239db792 100644 (file)
@@ -86,8 +86,6 @@ static bool noanswer = false;
 
 static atomic_bool POST = true;
 
-static atomic_bool slowdown = false;
-
 static atomic_bool use_TLS = false;
 static isc_tlsctx_t *server_tlsctx = NULL;
 static isc_tlsctx_t *client_tlsctx = NULL;
@@ -157,9 +155,6 @@ connect_send_cb(isc_nmhandle_t *handle, isc_result_t result, void *arg) {
 error:
        data.reply_cb(handle, result, NULL, data.cb_arg);
        isc_mem_putanddetach(&data.mctx, data.region.base, data.region.length);
-       if (result == ISC_R_TOOMANYOPENFILES) {
-               atomic_store(&slowdown, true);
-       }
 }
 
 static void
@@ -729,7 +724,7 @@ doh_connect_thread(void *arg) {
         * errors, to prevent a thundering herd problem.
         */
        int_fast64_t active = atomic_fetch_add(&active_cconnects, 1);
-       if (atomic_load(&slowdown) || active > workers) {
+       if (active > workers) {
                goto next;
        }
        connect_send_request(connect_nm, req_url, atomic_load(&POST),