diff --git a/src/curlinfo.c b/src/curlinfo.c index 722e4ff44e..13b9d62ce0 100644 --- a/src/curlinfo.c +++ b/src/curlinfo.c @@ -34,7 +34,7 @@ #include "multihandle.h" /* for ENABLE_WAKEUP */ #include "tool_xattr.h" /* for USE_XATTR */ #include "curl_sha512_256.h" /* for CURL_HAVE_SHA512_256 */ -#include "asyn.h" /* for USE_RESOLV_ARES */ +#include "asyn.h" /* for USE_RESOLV_ARES, USE_RESOLV_THREADED */ #include "fake_addrinfo.h" /* for USE_FAKE_GETADDRINFO */ #include @@ -143,6 +143,13 @@ static const char *disabled[] = { "OFF" #else "ON" +#endif + , + "resolv-threaded: " +#ifndef USE_RESOLV_THREADED + "OFF" +#else + "ON" #endif , "typecheck: " diff --git a/tests/http/test_21_resolve.py b/tests/http/test_21_resolve.py index f72fe2f081..6fb07cc0a7 100644 --- a/tests/http/test_21_resolve.py +++ b/tests/http/test_21_resolve.py @@ -109,7 +109,7 @@ class TestResolve: assert os.path.exists(dfiles[1]) # use .invalid host name, parallel, single resolve thread - @pytest.mark.skipif(condition=Env.curl_uses_lib('c-ares'), reason="c-ares resolver skipped") + @pytest.mark.skipif(condition=not Env.curl_resolv_threaded(), reason="no threaded resolver") def test_21_05_resolv_single_thread(self, env: Env, httpd, nghttpx): count = 10 delay_ms = 50 diff --git a/tests/http/testenv/env.py b/tests/http/testenv/env.py index dcfc6857e8..30fc0d0a73 100644 --- a/tests/http/testenv/env.py +++ b/tests/http/testenv/env.py @@ -165,6 +165,7 @@ class EnvConfig: self.curl_is_verbose = 'verbose-strings: ON' in p.stdout self.curl_can_cert_status = 'cert-status: ON' in p.stdout self.curl_override_dns = 'override-dns: ON' in p.stdout + self.curl_resolv_threaded = 'resolv-threaded: ON' in p.stdout self.ports = {} @@ -515,6 +516,10 @@ class Env: def curl_override_dns() -> bool: return Env.CONFIG.curl_override_dns + @staticmethod + def curl_resolv_threaded() -> bool: + return Env.CONFIG.curl_resolv_threaded + @staticmethod def curl_can_early_data() -> bool: if Env.curl_uses_lib('gnutls'):